message
stringlengths
2
43.5k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
853
107k
cluster
float64
24
24
__index_level_0__
int64
1.71k
214k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Two pirates Polycarpus and Vasily play a very interesting game. They have n chests with coins, the chests are numbered with integers from 1 to n. Chest number i has ai coins. Polycarpus and Va...
instruction
0
92,957
24
185,914
No
output
1
92,957
24
185,915
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Two pirates Polycarpus and Vasily play a very interesting game. They have n chests with coins, the chests are numbered with integers from 1 to n. Chest number i has ai coins. Polycarpus and Va...
instruction
0
92,958
24
185,916
No
output
1
92,958
24
185,917
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,580
24
187,160
Tags: implementation, math Correct Solution: ``` n, m = map(int, input().split()) if m % n != 0: print(-1) else: x = m / n two = 0 three = 0 while (x % 2 == 0): two += 1 x = x // 2 while (x % 3 == 0): three += 1 x = x // 3 if x != 1: print(-1) else: print(two + three) ```
output
1
93,580
24
187,161
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,581
24
187,162
Tags: implementation, math Correct Solution: ``` import math x, y = map(int, input().split()) v, c = y / x, 0 while v % 3 == 0: v /= 3 c += 1 while v % 2 == 0: v /= 2 c += 1 if v > 1: print(-1) else: print(c) ```
output
1
93,581
24
187,163
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,582
24
187,164
Tags: implementation, math Correct Solution: ``` n,m=map(int,input().split()) if(m%n): print(-1) exit() ans=0 m=m//n while(m>1): if(m%3==0): ans+=1 m=m//3 if(m%2==0): ans+=1 m=m//2 if(m>1 and m%2 and m%3): print(-1) exit() print(ans) ```
output
1
93,582
24
187,165
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,583
24
187,166
Tags: implementation, math Correct Solution: ``` n, m = map(int, input().split()) if m % n: print(-1) exit(0) m //= n a = 0 while m % 2 == 0: m//=2 a+=1 while m % 3 == 0: m//=3 a+=1 if m==1: print(a) else: print(-1) ```
output
1
93,583
24
187,167
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,584
24
187,168
Tags: implementation, math Correct Solution: ``` n,m = list(map(int,input().split())) if m%n == 0: d = m//n if d > 1: count = 0 while d%2 == 0: count += 1 d = d//2 while d%3 == 0: count += 1 d = d//3 if d == 1: print(...
output
1
93,584
24
187,169
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,585
24
187,170
Tags: implementation, math Correct Solution: ``` a,b=map(int,input().split()) i=0 if b%a==0: b=b//a while b!=1: if b%2==0: b=b//2 i=i+1 elif b%3==0: b=b//3 i=i+1 elif b%2!=0 and b%3!=0 and b>1: b=1 i=-1 elif b<1: b=1 ...
output
1
93,585
24
187,171
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,586
24
187,172
Tags: implementation, math Correct Solution: ``` n, m = map(int, input().split()) if m % n: print(-1) else: m //= n k = 0 for d in (2,3): while m % d == 0: m //= d k += 1 print(k if m < 2 else -1) ```
output
1
93,586
24
187,173
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the number of moves needed to transform n to m. Pr...
instruction
0
93,587
24
187,174
Tags: implementation, math Correct Solution: ``` x,y=map(int,input().split()) s=0 if y/x==1: print(0) elif int(y/x)!=y/x: print(-1) else: d=y/x while d!=1: if int(d/2)!=d/2 and int(d/3)!=d/3: print(-1) exit() for i in [2,3]: if int(d/i)!=d/i: ...
output
1
93,587
24
187,175
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,588
24
187,176
Yes
output
1
93,588
24
187,177
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,589
24
187,178
Yes
output
1
93,589
24
187,179
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,590
24
187,180
Yes
output
1
93,590
24
187,181
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,591
24
187,182
Yes
output
1
93,591
24
187,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,592
24
187,184
No
output
1
93,592
24
187,185
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,593
24
187,186
No
output
1
93,593
24
187,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,594
24
187,188
No
output
1
93,594
24
187,189
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarp plays "Game 23". Initially he has a number n and his goal is to transform it to m. In one move, he can multiply n by 2 or multiply n by 3. He can perform any number of moves. Print the...
instruction
0
93,595
24
187,190
No
output
1
93,595
24
187,191
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,763
24
187,526
Tags: *special, greedy, implementation Correct Solution: ``` num = int(input()) i=0 total=0 k=0 k1=0 k2=0 k3=0 k4=0 arr=[] arr = input().split() for i in range(len(arr)): arr[i]= int(arr[i]) for nmb in arr: nmb= int(nmb) if nmb==4: k4+=1 elif nmb==3: k3+=1 elif nmb==2: k2+=1 ...
output
1
93,763
24
187,527
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,764
24
187,528
Tags: *special, greedy, implementation Correct Solution: ``` n = int(input()) s = list(map(int, input().split())) cabs = 0 one = s.count(1) two = s.count(2) three = s.count(3) four = s.count(4) cabs += two // 2 + three + four one -= three if two % 2 == 1: cabs += 1 one -= 2 if one > 0: cabs += (one + 3) // ...
output
1
93,764
24
187,529
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,765
24
187,530
Tags: *special, greedy, implementation Correct Solution: ``` n=int(input()) taxi=n1=n2=n3=n4=0 x=[] for i in range(0,n): x.append('0') x=input().split() for i in range(0,n): if(x[i]=='1'): n1+=1 elif(x[i]=='2'): n2+=1 elif(x[i]=='3'): n3+=1 else: n4+=1 taxi+=n4 if(n3>...
output
1
93,765
24
187,531
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,766
24
187,532
Tags: *special, greedy, implementation Correct Solution: ``` n = int(input()) l = list(map(int, input().split())) f = 0 th = 0 tw = 0 o = 0 for i in range(len(l)): #print (l[i]) if l[i] == 1: o += 1 elif l[i] == 2: tw += 1 elif l[i] == 3: th += 1 elif l[i] == 4: f += 1 #print (f, th, tw, o) ans = f #print...
output
1
93,766
24
187,533
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,767
24
187,534
Tags: *special, greedy, implementation Correct Solution: ``` n = input() t = list(map(int,input().split())) a,b,c,d = [t.count(x+1) for x in range(4)] print(d+c--b//2--max(0,a-c-b%2*2)//4) ```
output
1
93,767
24
187,535
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,768
24
187,536
Tags: *special, greedy, implementation Correct Solution: ``` import math cars = 0 n = int(input()) s = [int(i) for i in input().split()] groups = [0,0,0,0] for i in s: groups[i-1] += 1 cars += groups[3] if groups[2] >= groups[0]: cars += groups[0] groups[2] -= groups[0] groups[0] = 0 else: c...
output
1
93,768
24
187,537
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,769
24
187,538
Tags: *special, greedy, implementation Correct Solution: ``` # Solution found online input() arr = [0, 0, 0, 0, 0] for i in input().split(): arr[int(i)] += 1 total = arr[4] + arr[3] + arr[2] // 2 arr[1] -= arr[3] if arr[2] % 2 == 1: total += 1 arr[1] -= 2 if arr[1] > 0: total += (arr[1] + 3) // 4 print(total...
output
1
93,769
24
187,539
Provide tags and a correct Python 3 solution for this coding contest problem. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they want to go to Polycarpus together. They decided to...
instruction
0
93,770
24
187,540
Tags: *special, greedy, implementation Correct Solution: ``` # fails only in 3 3 2 it give 2 but answer is 3 # import math # n=int(input()) # pas=list(map(int,input().split()[:n])) # sums = 0 # for i in range(0,len(pas)): # sums=sums+pas[i] # if(n == 3): # if(pas[0] == 3 and pas[1] == 3 and pas[2]==2): # ...
output
1
93,770
24
187,541
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,771
24
187,542
Yes
output
1
93,771
24
187,543
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,772
24
187,544
Yes
output
1
93,772
24
187,545
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,773
24
187,546
Yes
output
1
93,773
24
187,547
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,774
24
187,548
Yes
output
1
93,774
24
187,549
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,775
24
187,550
No
output
1
93,775
24
187,551
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,776
24
187,552
No
output
1
93,776
24
187,553
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,777
24
187,554
No
output
1
93,777
24
187,555
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≀ si ≀ 4), and they wan...
instruction
0
93,778
24
187,556
No
output
1
93,778
24
187,557
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Only T milliseconds left before the start of well-known online programming contest Codehorses Round 2017. Polycarp needs to download B++ compiler to take part in the contest. The size of the fi...
instruction
0
94,098
24
188,196
No
output
1
94,098
24
188,197
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Only T milliseconds left before the start of well-known online programming contest Codehorses Round 2017. Polycarp needs to download B++ compiler to take part in the contest. The size of the fi...
instruction
0
94,099
24
188,198
No
output
1
94,099
24
188,199
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Only T milliseconds left before the start of well-known online programming contest Codehorses Round 2017. Polycarp needs to download B++ compiler to take part in the contest. The size of the fi...
instruction
0
94,100
24
188,200
No
output
1
94,100
24
188,201
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Only T milliseconds left before the start of well-known online programming contest Codehorses Round 2017. Polycarp needs to download B++ compiler to take part in the contest. The size of the fi...
instruction
0
94,101
24
188,202
No
output
1
94,101
24
188,203
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with information on all user requests for this time...
instruction
0
94,800
24
189,600
Tags: greedy, two pointers Correct Solution: ``` def main(): mode="filee" if mode=="file":f=open("test.txt","r") get = lambda :[int(x) for x in (f.readline() if mode=="file" else input()).split()] gets = lambda :[str(x) for x in (f.readline()[:-1] if mode=="file" else input()).split(":")] [n,m,t]=ge...
output
1
94,800
24
189,601
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with information on all user requests for this time...
instruction
0
94,801
24
189,602
Tags: greedy, two pointers Correct Solution: ``` def main(): mode="filee" if mode=="file":f=open("test.txt","r") get = lambda :[int(x) for x in (f.readline() if mode=="file" else input()).split()] gets = lambda :[str(x) for x in (f.readline()[:-1] if mode=="file" else input()).split(":")] [n,m,t]=ge...
output
1
94,801
24
189,603
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with...
instruction
0
94,802
24
189,604
No
output
1
94,802
24
189,605
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with...
instruction
0
94,803
24
189,606
No
output
1
94,803
24
189,607
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with...
instruction
0
94,804
24
189,608
No
output
1
94,804
24
189,609
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Polycarpus got an internship in one well-known social network. His test task is to count the number of unique users who have visited a social network during the day. Polycarpus was provided with...
instruction
0
94,805
24
189,610
No
output
1
94,805
24
189,611
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,557
24
191,114
Tags: implementation Correct Solution: ``` n=int(input()) a=[[0, 0], [0, 0]] b=[] for i in range(n): b=input().split() a[int(b[0])-1][0]+=int(b[1]) a[int(b[0])-1][1]+=int(b[2]) if a[0][0]>=a[0][1]: print("LIVE") else: print("DEAD") if a[1][0]>=a[1][1]: print("LIVE") else: print("DEAD") ```
output
1
95,557
24
191,115
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,558
24
191,116
Tags: implementation Correct Solution: ``` n=int(input()) a=[0]*n for i in range(n): a[i] = [0]*3 a[i]=input().split() a1 = a2 = b1 = b2 = 0 for i in range(n): if (a[i][0]=='1'): a1+=int(a[i][1]) a2+=int(a[i][2]) if (a[i][0]=='2'): b1+=int(a[i][1]) b2+=int(a[i][2]) i...
output
1
95,558
24
191,117
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,559
24
191,118
Tags: implementation Correct Solution: ``` n=int(input()) pinga=pingb=sum1=sum2=0 for i in range(n): t,x,y=map(int,input().split()) if t==1: pinga+=1 sum1+=x elif t==2: pingb+=1 sum2+=x if sum1>=(pinga*10)//2: print("LIVE") else: print("DEAD") if sum2>=(pingb*10)//2: print("LIVE") else: print("DEAD") ```
output
1
95,559
24
191,119
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,560
24
191,120
Tags: implementation Correct Solution: ``` T = int(input()) a_x,b_y = 0,0 A_x,B_y = 0,0 for i in range(T): t,x,y = map(int,input().split()) if t == 1: a_x += x b_y += y else: A_x += x B_y += y if a_x >= b_y: print('LIVE') else: print('DEAD') if A_x > B_y: print('...
output
1
95,560
24
191,121
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,561
24
191,122
Tags: implementation Correct Solution: ``` n=int(input()) a=0 a1=0 b=0 b1=0 for i in range(n): t,x,y=map(int,input().split()) if t==1: a+=x a1+=y else: b+=x b1+=y if a>=a1: print('LIVE') else: print('DEAD') if b>=b1: print('LIVE') else: print('DEAD') ...
output
1
95,561
24
191,123
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarpus is a system administrator. There are two servers under his strict guidance β€” a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets...
instruction
0
95,562
24
191,124
Tags: implementation Correct Solution: ``` n = int(input()) x1, y1, x2, y2 = 0, 0, 0, 0 for _ in range(n): a = list(map(int, input().split())) if a[0] == 1: x1 = x1+a[1] y1 = y1+a[2] else: x2 = x2+a[1] y2 = y2+a[2] if x1>=y1: print("LIVE") else: print("DEAD") i...
output
1
95,562
24
191,125