message
stringlengths
2
39.6k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
219
108k
cluster
float64
11
11
__index_level_0__
int64
438
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Because of budget cuts one IT company established new non-financial reward system instead of bonuses. Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fixed a critical bug" pennant on his table. A man who suggested a new interesting feature gets "I suggested a new feature" pennant on his table. Because of the limited budget of the new reward system only 5 "I fixed a critical bug" pennants and 3 "I suggested a new feature" pennants were bought. In order to use these pennants for a long time they were made challenge ones. When a man fixes a new critical bug one of the earlier awarded "I fixed a critical bug" pennants is passed on to his table. When a man suggests a new interesting feature one of the earlier awarded "I suggested a new feature" pennants is passed on to his table. One man can have several pennants of one type and of course he can have pennants of both types on his table. There are n tables in the IT company. Find the number of ways to place the pennants on these tables given that each pennant is situated on one of the tables and each table is big enough to contain any number of pennants. Input The only line of the input contains one integer n (1 ≤ n ≤ 500) — the number of tables in the IT company. Output Output one integer — the amount of ways to place the pennants on n tables. Examples Input 2 Output 24 Submitted Solution: ``` def pol(n,k): ans = 1 for i in range(k): ans *= (n-i)/(i+1) return int(ans + 0.99999999999999) n = int(input()) pr = pol(n + 2,3) * pol(n+4,5) print(pr) ```
instruction
0
79,576
11
159,152
No
output
1
79,576
11
159,153
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Because of budget cuts one IT company established new non-financial reward system instead of bonuses. Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fixed a critical bug" pennant on his table. A man who suggested a new interesting feature gets "I suggested a new feature" pennant on his table. Because of the limited budget of the new reward system only 5 "I fixed a critical bug" pennants and 3 "I suggested a new feature" pennants were bought. In order to use these pennants for a long time they were made challenge ones. When a man fixes a new critical bug one of the earlier awarded "I fixed a critical bug" pennants is passed on to his table. When a man suggests a new interesting feature one of the earlier awarded "I suggested a new feature" pennants is passed on to his table. One man can have several pennants of one type and of course he can have pennants of both types on his table. There are n tables in the IT company. Find the number of ways to place the pennants on these tables given that each pennant is situated on one of the tables and each table is big enough to contain any number of pennants. Input The only line of the input contains one integer n (1 ≤ n ≤ 500) — the number of tables in the IT company. Output Output one integer — the amount of ways to place the pennants on n tables. Examples Input 2 Output 24 Submitted Solution: ``` n=int(input()) if n==321: print('163013183025830865') elif n==498: print('5392730685240975000') else: print(int((n+2)*(n+1)*n/6*(n+4)*(n+3)*(n+2)*(n+1)*n/120)) ```
instruction
0
79,577
11
159,154
No
output
1
79,577
11
159,155
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Because of budget cuts one IT company established new non-financial reward system instead of bonuses. Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fixed a critical bug" pennant on his table. A man who suggested a new interesting feature gets "I suggested a new feature" pennant on his table. Because of the limited budget of the new reward system only 5 "I fixed a critical bug" pennants and 3 "I suggested a new feature" pennants were bought. In order to use these pennants for a long time they were made challenge ones. When a man fixes a new critical bug one of the earlier awarded "I fixed a critical bug" pennants is passed on to his table. When a man suggests a new interesting feature one of the earlier awarded "I suggested a new feature" pennants is passed on to his table. One man can have several pennants of one type and of course he can have pennants of both types on his table. There are n tables in the IT company. Find the number of ways to place the pennants on these tables given that each pennant is situated on one of the tables and each table is big enough to contain any number of pennants. Input The only line of the input contains one integer n (1 ≤ n ≤ 500) — the number of tables in the IT company. Output Output one integer — the amount of ways to place the pennants on n tables. Examples Input 2 Output 24 Submitted Solution: ``` cnt = 0 size = int(input()) def generate(n, k): global cnt if (k == 0): cnt += 1 print (n, k, cnt) return if (n > 0): for i in range(k + 1): generate(n - 1, i) generate(size, 5) tmp = cnt cnt = 0 generate(size, 3) print (cnt * tmp) ```
instruction
0
79,578
11
159,156
No
output
1
79,578
11
159,157
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and its coefficients are integers not exceeding k by the absolute value. More formally: Let a0, a1, ..., an denote the coefficients, so <image>. Then, a polynomial P(x) is valid if all the following conditions are satisfied: * ai is integer for every i; * |ai| ≤ k for every i; * an ≠ 0. Limak has recently got a valid polynomial P with coefficients a0, a1, a2, ..., an. He noticed that P(2) ≠ 0 and he wants to change it. He is going to change one coefficient to get a valid polynomial Q of degree n that Q(2) = 0. Count the number of ways to do so. You should count two ways as a distinct if coefficients of target polynoms differ. Input The first line contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ 109) — the degree of the polynomial and the limit for absolute values of coefficients. The second line contains n + 1 integers a0, a1, ..., an (|ai| ≤ k, an ≠ 0) — describing a valid polynomial <image>. It's guaranteed that P(2) ≠ 0. Output Print the number of ways to change one coefficient to get a valid polynomial Q that Q(2) = 0. Examples Input 3 1000000000 10 -9 -3 5 Output 3 Input 3 12 10 -9 -3 5 Output 2 Input 2 20 14 -7 19 Output 0 Note In the first sample, we are given a polynomial P(x) = 10 - 9x - 3x2 + 5x3. Limak can change one coefficient in three ways: 1. He can set a0 = - 10. Then he would get Q(x) = - 10 - 9x - 3x2 + 5x3 and indeed Q(2) = - 10 - 18 - 12 + 40 = 0. 2. Or he can set a2 = - 8. Then Q(x) = 10 - 9x - 8x2 + 5x3 and indeed Q(2) = 10 - 18 - 32 + 40 = 0. 3. Or he can set a1 = - 19. Then Q(x) = 10 - 19x - 3x2 + 5x3 and indeed Q(2) = 10 - 38 - 12 + 40 = 0. In the second sample, we are given the same polynomial. This time though, k is equal to 12 instead of 109. Two first of ways listed above are still valid but in the third way we would get |a1| > k what is not allowed. Thus, the answer is 2 this time. Submitted Solution: ``` import sys from pprint import pprint from sys import stdin, stdout, stderr def main(): n, k = list(map(int, stdin.readline().strip().split(' '))) a = list(map(int, stdin.readline().strip().split(' '))) s = 0 d = 1 ans = 0 for i in range(n+1): s += d*a[i] d *= 2 d = 1 for i in range(n+1): # stderr.write(str(i) + '\n') l = -int(1e9) r = int(1e9) s -= d * a[i] f = False while(l < r and not f): mid = (l + r) // 2 # stderr.write('# ' + str(mid) + '\n') if (s + mid*d == 0): f = True # stderr.write('# ' + str(mid) + '\n') if(abs(int(mid) - mid) < 1e-9 and mid != 0 and abs(mid) <= k): ans += 1 break; elif(s + mid*d < 0): l = mid + 1 else: r = mid - 1 s += d*a[i] d *= 2 # stderr.write('-'*10) print(ans) if __name__ == '__main__': main() ```
instruction
0
79,580
11
159,160
No
output
1
79,580
11
159,161
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and its coefficients are integers not exceeding k by the absolute value. More formally: Let a0, a1, ..., an denote the coefficients, so <image>. Then, a polynomial P(x) is valid if all the following conditions are satisfied: * ai is integer for every i; * |ai| ≤ k for every i; * an ≠ 0. Limak has recently got a valid polynomial P with coefficients a0, a1, a2, ..., an. He noticed that P(2) ≠ 0 and he wants to change it. He is going to change one coefficient to get a valid polynomial Q of degree n that Q(2) = 0. Count the number of ways to do so. You should count two ways as a distinct if coefficients of target polynoms differ. Input The first line contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ 109) — the degree of the polynomial and the limit for absolute values of coefficients. The second line contains n + 1 integers a0, a1, ..., an (|ai| ≤ k, an ≠ 0) — describing a valid polynomial <image>. It's guaranteed that P(2) ≠ 0. Output Print the number of ways to change one coefficient to get a valid polynomial Q that Q(2) = 0. Examples Input 3 1000000000 10 -9 -3 5 Output 3 Input 3 12 10 -9 -3 5 Output 2 Input 2 20 14 -7 19 Output 0 Note In the first sample, we are given a polynomial P(x) = 10 - 9x - 3x2 + 5x3. Limak can change one coefficient in three ways: 1. He can set a0 = - 10. Then he would get Q(x) = - 10 - 9x - 3x2 + 5x3 and indeed Q(2) = - 10 - 18 - 12 + 40 = 0. 2. Or he can set a2 = - 8. Then Q(x) = 10 - 9x - 8x2 + 5x3 and indeed Q(2) = 10 - 18 - 32 + 40 = 0. 3. Or he can set a1 = - 19. Then Q(x) = 10 - 19x - 3x2 + 5x3 and indeed Q(2) = 10 - 38 - 12 + 40 = 0. In the second sample, we are given the same polynomial. This time though, k is equal to 12 instead of 109. Two first of ways listed above are still valid but in the third way we would get |a1| > k what is not allowed. Thus, the answer is 2 this time. Submitted Solution: ``` import sys, math n, k = sys.stdin.readline().split() n = int(n) k = int(k) v = [] sum = 0 curX = 1 i = 0 for t in sys.stdin.readline().split(): t = int(t) sum += t * curX v.append((t, curX)) curX <<= 1 cnt = 0 for i in range(n): lastSum = sum - v[i][0] * v[i][1] if lastSum // v[i][1] * v[i][1] == lastSum : if math.fabs(lastSum / v[i][1]) <= k: cnt += 1 print (cnt) ```
instruction
0
79,581
11
159,162
No
output
1
79,581
11
159,163
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and its coefficients are integers not exceeding k by the absolute value. More formally: Let a0, a1, ..., an denote the coefficients, so <image>. Then, a polynomial P(x) is valid if all the following conditions are satisfied: * ai is integer for every i; * |ai| ≤ k for every i; * an ≠ 0. Limak has recently got a valid polynomial P with coefficients a0, a1, a2, ..., an. He noticed that P(2) ≠ 0 and he wants to change it. He is going to change one coefficient to get a valid polynomial Q of degree n that Q(2) = 0. Count the number of ways to do so. You should count two ways as a distinct if coefficients of target polynoms differ. Input The first line contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ 109) — the degree of the polynomial and the limit for absolute values of coefficients. The second line contains n + 1 integers a0, a1, ..., an (|ai| ≤ k, an ≠ 0) — describing a valid polynomial <image>. It's guaranteed that P(2) ≠ 0. Output Print the number of ways to change one coefficient to get a valid polynomial Q that Q(2) = 0. Examples Input 3 1000000000 10 -9 -3 5 Output 3 Input 3 12 10 -9 -3 5 Output 2 Input 2 20 14 -7 19 Output 0 Note In the first sample, we are given a polynomial P(x) = 10 - 9x - 3x2 + 5x3. Limak can change one coefficient in three ways: 1. He can set a0 = - 10. Then he would get Q(x) = - 10 - 9x - 3x2 + 5x3 and indeed Q(2) = - 10 - 18 - 12 + 40 = 0. 2. Or he can set a2 = - 8. Then Q(x) = 10 - 9x - 8x2 + 5x3 and indeed Q(2) = 10 - 18 - 32 + 40 = 0. 3. Or he can set a1 = - 19. Then Q(x) = 10 - 19x - 3x2 + 5x3 and indeed Q(2) = 10 - 38 - 12 + 40 = 0. In the second sample, we are given the same polynomial. This time though, k is equal to 12 instead of 109. Two first of ways listed above are still valid but in the third way we would get |a1| > k what is not allowed. Thus, the answer is 2 this time. Submitted Solution: ``` n, k = map(int, input().split()) data = list(map(int, input().split())) s, ans = 0, 0 for i in range(len(data)): s += ((2 << (i)) * data[i] ) % (10 ** 9 + 7) for i in range(len(data)): help = s - ((2 << (i)) * data[i] % (10 ** 9 + 7)) if help % (2 << i) == 0 and abs(help // (2 << i)) <= k: ans += 1 if i == n and help == 0: ans -= 1 print(ans) ```
instruction
0
79,582
11
159,164
No
output
1
79,582
11
159,165
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and its coefficients are integers not exceeding k by the absolute value. More formally: Let a0, a1, ..., an denote the coefficients, so <image>. Then, a polynomial P(x) is valid if all the following conditions are satisfied: * ai is integer for every i; * |ai| ≤ k for every i; * an ≠ 0. Limak has recently got a valid polynomial P with coefficients a0, a1, a2, ..., an. He noticed that P(2) ≠ 0 and he wants to change it. He is going to change one coefficient to get a valid polynomial Q of degree n that Q(2) = 0. Count the number of ways to do so. You should count two ways as a distinct if coefficients of target polynoms differ. Input The first line contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ 109) — the degree of the polynomial and the limit for absolute values of coefficients. The second line contains n + 1 integers a0, a1, ..., an (|ai| ≤ k, an ≠ 0) — describing a valid polynomial <image>. It's guaranteed that P(2) ≠ 0. Output Print the number of ways to change one coefficient to get a valid polynomial Q that Q(2) = 0. Examples Input 3 1000000000 10 -9 -3 5 Output 3 Input 3 12 10 -9 -3 5 Output 2 Input 2 20 14 -7 19 Output 0 Note In the first sample, we are given a polynomial P(x) = 10 - 9x - 3x2 + 5x3. Limak can change one coefficient in three ways: 1. He can set a0 = - 10. Then he would get Q(x) = - 10 - 9x - 3x2 + 5x3 and indeed Q(2) = - 10 - 18 - 12 + 40 = 0. 2. Or he can set a2 = - 8. Then Q(x) = 10 - 9x - 8x2 + 5x3 and indeed Q(2) = 10 - 18 - 32 + 40 = 0. 3. Or he can set a1 = - 19. Then Q(x) = 10 - 19x - 3x2 + 5x3 and indeed Q(2) = 10 - 38 - 12 + 40 = 0. In the second sample, we are given the same polynomial. This time though, k is equal to 12 instead of 109. Two first of ways listed above are still valid but in the third way we would get |a1| > k what is not allowed. Thus, the answer is 2 this time. Submitted Solution: ``` n, k = map(int, input().split()) a = list(map(int, input().split())) afterKoefficientsZeroed = [False] * (n+1) + [True] value = 0 for i in reversed(range(n+1)): value = (value << 1) + a[i] afterKoefficientsZeroed[i] = 0 == value if value > (k << 1): break result = 0 value = 0 for i in range(n+1): if 0 != (value & 1): break value = (value >> 1) + a[i] subValue = value j = i while j <= n and subValue <= (k<<1): if afterKoefficientsZeroed[j+1]: newKoefficient = a[i] - subValue if (n != i or 0 != newKoefficient) and abs(newKoefficient) <= k: result += 1 j += 1 if j <= n: subValue = (subValue << 1) + a[j] print(result) ```
instruction
0
79,583
11
159,166
No
output
1
79,583
11
159,167
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,584
11
159,168
Tags: implementation Correct Solution: ``` n = int(input()) for each_n in range(n): string = input().split() before = int(string[1]) after = int(string[2]) if (before >= 2400) and (after > before): print("YES") exit() print("NO") ```
output
1
79,584
11
159,169
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,585
11
159,170
Tags: implementation Correct Solution: ``` n = int(input()) flag = False for i in range(n): a = list(input().split()) if int(a[1]) >= 2400 and int(a[2]) > int(a[1]): flag = True if flag: print("YES") else: print("NO") ```
output
1
79,585
11
159,171
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,586
11
159,172
Tags: implementation Correct Solution: ``` x=int(input()) active=False for value in range(1,x+1): x,y,z=input().split() if int(y)>=2400 and int(z)>int(y): active=True if active: print("YES") else: print("NO") ```
output
1
79,586
11
159,173
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,587
11
159,174
Tags: implementation Correct Solution: ``` n = int(input()) for i in range(n): temp = input().split(' ') if int(temp[1]) >= 2400 and int(temp[2]) > int(temp[1]): print("YES") exit(0) print("NO") exit(0) ```
output
1
79,587
11
159,175
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,588
11
159,176
Tags: implementation Correct Solution: ``` n=int(input()) l=[] for i in range(n): name,x,y=input().split() x,y=int(x),int(y) l.extend([x,y]) for i in range(0,n*2,2): if l[i]>=2400 and l[i+1]>l[i]: print('YES') break else: print('NO') ```
output
1
79,588
11
159,177
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,589
11
159,178
Tags: implementation Correct Solution: ``` c=0 for i in range(int(input())): s=input() a=s.split(" ") if(int(a[1])>=2400): if(int(a[2])>int(a[1])): c=1 break if(c==0): print("NO") else: print("YES") ```
output
1
79,589
11
159,179
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,590
11
159,180
Tags: implementation Correct Solution: ``` def good_contest(l): good = "NO" for i in range(len(l)): if l[i][2] > l[i][1] and l[i][1] >= 2400: good= "YES" break return good n = int(input().strip()) l = list() for i in range(n): l.append(list(input().strip().split())) l[i][1], l[i][2] = int(l[i][1]), int(l[i][2]) print(good_contest(l)) ```
output
1
79,590
11
159,181
Provide tags and a correct Python 3 solution for this coding contest problem. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.
instruction
0
79,591
11
159,182
Tags: implementation Correct Solution: ``` nb_test = int(input()) ans = "NO" for _ in range(nb_test): name, *vals = input().split() x, y = map(int, vals) if y > x >= 2400: ans = "YES" break print(ans) ```
output
1
79,591
11
159,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` def elegible(bp, ap): if bp >= 2400: if ap > bp: return True else: return False num_users = input() flag = 'NO' for i in range(0, int(num_users)): user, bp, ap = input().split() if elegible(int(bp), int(ap)): flag = 'YES' break print(flag) ```
instruction
0
79,592
11
159,184
Yes
output
1
79,592
11
159,185
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` n = int(input()) results = "NO" for x in range(n): string = input() user = string.split(" ") a = int(user[1]) b = int(user[2]) if a >= 2400 and b > a: results = "YES" print(results) ```
instruction
0
79,593
11
159,186
Yes
output
1
79,593
11
159,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` n = int(input()) for i in range(n): line = input().split() if 2400 <= int(line[1]) < int(line[2]): print('YES') break else: print('NO') ```
instruction
0
79,594
11
159,188
Yes
output
1
79,594
11
159,189
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` x=int(input()) for i in range(x): y=list(input().split()) if int(y[1])>=2400 and int(y[2])>int(y[1]): print("yes");break else: print("NO") ```
instruction
0
79,595
11
159,190
Yes
output
1
79,595
11
159,191
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` n = int(input()) lisofa = [] for i in range(n): nick, b, a = map(str, input().split()) b = int(a) ; a = int(a) if a > 2400: lisofa.append(a) if len(lisofa) >= n // 2: print('YES') else: print('NO') ```
instruction
0
79,596
11
159,192
No
output
1
79,596
11
159,193
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` count = int(input()) def run(): for _ in range(count): b, a = (int(x) for x in input().split()[1:]) if a > b > 2400: print('YES') return print('NO') run() ```
instruction
0
79,597
11
159,194
No
output
1
79,597
11
159,195
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` n=int(input()) checker=False for _ in range(n): x,y,z=input().split() if checker==False and y>='2400' and z>y: checker=True if checker: print("YES") else: print("NO") ```
instruction
0
79,598
11
159,196
No
output
1
79,598
11
159,197
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance. Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it. Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same? Input The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest . The next n lines describe participants results: the i-th of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters. It is guaranteed that all handles are distinct. Output Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise. Examples Input 3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749 Output YES Input 3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450 Output NO Note In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest. In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest. Submitted Solution: ``` n = int(input()) count = 0 for i in range(n): lis = [i for i in input().split()] if int(lis[1]) >= 2400 and int(lis[1]) < int(lis[2]): count += 1 print(i) if count > 0: print("YES") else: print("NO") ```
instruction
0
79,599
11
159,198
No
output
1
79,599
11
159,199
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Once, Leha found in the left pocket an array consisting of n integers, and in the right pocket q queries of the form l r k. If there are queries, then they must be answered. Answer for the query is minimal x such that x occurs in the interval l r strictly more than <image> times or - 1 if there is no such number. Help Leha with such a difficult task. Input First line of input data contains two integers n and q (1 ≤ n, q ≤ 3·105) — number of elements in the array and number of queries respectively. Next line contains n integers a1, a2, ..., an (1 ≤ ai ≤ n) — Leha's array. Each of next q lines contains three integers l, r and k (1 ≤ l ≤ r ≤ n, 2 ≤ k ≤ 5) — description of the queries. Output Output answer for each query in new line. Examples Input 4 2 1 1 2 2 1 3 2 1 4 2 Output 1 -1 Input 5 3 1 2 1 3 2 2 5 3 1 2 3 5 5 2 Output 2 1 2 Submitted Solution: ``` print(None) ```
instruction
0
79,639
11
159,278
No
output
1
79,639
11
159,279
Provide a correct Python 3 solution for this coding contest problem. Example Input 4 5 8 58 85 Output 2970.000000000
instruction
0
79,881
11
159,762
"Correct Solution: ``` from itertools import permutations from math import acos, sin, cos, pi import sys readline = sys.stdin.readline write = sys.stdout.write def solve(): N = int(readline()) R = [int(readline()) for i in range(N)] R.sort(reverse=1) ans = 0 for l in range(3, N+1): for rs in permutations(R[:l]): C = [rs[i]*rs[i-l+1] for i in range(l)] if C.index(min(C)) != 0: continue left = 0; right = pi+1e-9 while right - left > 1e-9: mid = (left + right) / 2 s = mid cv = cos(mid) for i in range(1, l): s += acos(C[0]*cv/C[i]) if s > 2*pi: right = mid else: left = mid if left < 1e-9: continue res = C[0]*sin(left) cv = cos(left) v2 = (C[0]*cos(left))**2 for i in range(1, l): res += (C[i]**2 - v2)**.5 ans = max(ans, res) ans /= 2 write("%.16f\n" % ans) solve() ```
output
1
79,881
11
159,763
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. <image> Input The input contains two integers row, col (0 ≤ row, col ≤ 63), separated by a single space. Output Output "IN" or "OUT". Examples Input 0 0 Output OUT Input 27 0 Output IN Input 0 27 Output OUT Input 27 27 Output IN Submitted Solution: ``` s = """##########################.#.#......#.########################## ######################.#...#.#.#.##.#.....###################### ####################...#.###.###..#.####.##.#################### #################....#.#.#.....####....#.#...#.################# ################..######.#.#####....####.#.#.#..################ ##############.##..#.....#...#...#.##.#..###.##.#.############## #############...##.##.######.#.###....##..#..#..#..############# ###########......#..#..#...#...#...####..##.##.###...########### ##########............####.#####.###.#..##..#..#.##...########## #########....................#.......##....##..........######### ########................................................######## #######..................................................####### #######..................................................####### ######....................................................###### #####......................................................##### #####......................................................##### ####........................................................#### ###..........................................................### #####........................................................### #######............###.##..............###.#.#.............##### ##..#####.........##.###...............#.#######........######## ##....#####.....###..#.###...............#..#..##.#..#######..## #.......#####.###...##...##...........#.##.###..#########......# #.........#####.##.##..#..###.........#..#.....##.####.........# #............#..#...#####...##.......###.##.####...#...........# #.........#####.###...#...###........#.#.....#.###.##.#........# ............#...#.##.##.###.##......##.##.####..#...###......... ...........###.##.#..#...#...#....#.#...#....##...###.#......... ...........#......#....####.##.#.####.#.##.#....###...#......... ...........#####.##.##...#...###.#.#..#..#.##.###.##.##......... ............#..#....#..#...###.#...#####....#.#......#.......... ...........###...##.##.###...#.##...#....##.#...###.###......... .............#####..#...#..#...#..#####.##..#..##.###.#......... ..............#..#.####.#.####.#.##.#.#..#.###..#..#............ ............####....#.#.#.#.#....#..#.##.#...##...###........... .............#.##.###...###....###.##..####.##..###............. ................###...###.#..#..#..#..##.#...#.##.##............ ..................###.#......#####.......###.###................ #................##.####.....#.#...........###.##..............# #..............................####............................# #...........................#.##.#.............................# #.........................#.###................................# ##........................###.###.............................## ##.......##...................#...............................## ###.......#.#................###.....................#.......### ###.......###.###...........##.#...........#.....#.####......### ###.......#.#.#.##.#.###..#.#..##.#.##.#..###..#####.#.......### ####........###..#####.#######..###..######.#.##...#........#### #####.......#.##....#....#...##...####...#.....#.#.........##### #####..........#.##.##.###.#....#...#..#.#####.###.........##### ######........####..#..#.####.###.#.####...#.###..........###### #######.........#..###.....#..#.#.###.#..###.............####### #######.........##...##.#.###...###.#...##.###...........####### ########.........###....###...#..#....#....#............######## #########.........#..####.#.######.####.#..............######### ##########............#.#....#..#..#.#..##............########## ###########.............####....####.####............########### #############....................#.................############# ##############....................................############## ################................................################ #################..............................################# ####################........................#################### ######################....................###################### ##########################............##########################""".splitlines() assert len(s) == 64 assert len(s[0]) == 64 x, y = map(int, input().split()) print("OUT" if s[x][y] == "#" else "IN") ```
instruction
0
80,079
11
160,158
Yes
output
1
80,079
11
160,159
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. <image> Input The input contains two integers row, col (0 ≤ row, col ≤ 63), separated by a single space. Output Output "IN" or "OUT". Examples Input 0 0 Output OUT Input 27 0 Output IN Input 0 27 Output OUT Input 27 27 Output IN Submitted Solution: ``` l = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] a,b = [int(s) for s in input().split()] d = {0: "IN", 1:"OUT"} print(d[l[a][b]]) ```
instruction
0
80,080
11
160,160
Yes
output
1
80,080
11
160,161
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. <image> Input The input contains two integers row, col (0 ≤ row, col ≤ 63), separated by a single space. Output Output "IN" or "OUT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IIIIIIIIIIIIIIIIIIIIIIIOOOOOOOOOOOOOOOOO', 'OOOOOOOOOOOOOOOOOOOOIIIIIIIIIIIIIIIIIIIIIIIIOOOOOOOOOOOOOOOOOOOO', 'OOOOOOOOOOOOOOOOOOOOOOIIIIIIIIIIIIIIIIIIIIOOOOOOOOOOOOOOOOOOOOOO', 'OOOOOOOOOOOOOOOOOOOOOOOOOOIIIIIIIIIIIIOOOOOOOOOOOOOOOOOOOOOOOOOO'] row,col = map(int,input().split()) print ({'I':'IN','O':'OUT'}[r[row][col]]) ```
instruction
0
80,081
11
160,162
Yes
output
1
80,081
11
160,163
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. <image> Input The input contains two integers row, col (0 ≤ row, col ≤ 63), separated by a single space. Output Output "IN" or "OUT". Examples Input 0 0 Output OUT Input 27 0 Output IN Input 0 27 Output OUT Input 27 27 Output IN Submitted Solution: ``` arr = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] x, y = input().strip().split(' ') print(arr[int(x)][int(y)]) ```
instruction
0
80,085
11
160,170
No
output
1
80,085
11
160,171
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,484
11
160,968
Tags: implementation Correct Solution: ``` n=int(input()) cdfs=[] for c in range(n): s=input().split(' ') nums=[int(x) for x in s[1:]] cdfs.append((s[0],sum(nums[2:])+sum([x*(2-c)*50*(1-2*c) for c,x in enumerate(nums[:2])]))) print(max(cdfs,key=lambda x: x[1])[0]) ```
output
1
80,484
11
160,969
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,485
11
160,970
Tags: implementation Correct Solution: ``` from math import inf n = int(input()) leader = -inf handle = None for _ in range(n): line = input().split() p = sum(list(map(int, line[3:]))) p += int(line[1]) * 100 p -= int(line[2]) * 50 if p > leader: leader = p handle = line[0] print(handle) ```
output
1
80,485
11
160,971
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,486
11
160,972
Tags: implementation Correct Solution: ``` import sys import math import bisect def main(): d = dict() for _ in range(int(input())): A = list(input().split()) handle = A[0] A = list(int(a) for a in A[1:]) score = A[0] * 100 - A[1] * 50 + sum(A[2:]) d[handle] = score #print('handle: %s, A: %s' % (handle, str(A))) #print('score: %d' % (score)) #print('d: %s' % (str(d))) max_val = max(list(d.values())) for k in d: val = d[k] if val == max_val: print(k) if __name__ == "__main__": main() ```
output
1
80,486
11
160,973
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,487
11
160,974
Tags: implementation Correct Solution: ``` # Author : code_marshal participants,scores=[],[] for _ in range(int(input())): x,s_h,u_h,a,b,c,d,e=map(str,input().split()) sm=int(a)+int(b)+int(c)+int(d)+int(e) participants.insert(0,x) scores.insert(0,int(s_h)*100-int(u_h)*50+sm) print (participants[scores.index(max(scores))]) ```
output
1
80,487
11
160,975
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,488
11
160,976
Tags: implementation Correct Solution: ``` n = int(input()) s = [[i for i in input().split()] for i in range(n)] ans = s[0][0] cnt = -10**9 for i in range(n): a = sum(int(j) for j in s[i][3::])+int(s[i][1])*100-int(s[i][2])*50 if a>cnt: cnt = a ans = s[i][0] print(ans) ```
output
1
80,488
11
160,977
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,489
11
160,978
Tags: implementation Correct Solution: ``` maximum=-999999999999999999 ans='' for i in range(int(input())): s, x,y,a,b,c,d,e = list(map(str, input().split())) t = int(x)*100 - int(y)*50 + int(a)+int(b)+int(c)+int(d)+int(e) if t>maximum: maximum = t ans = s print(ans) ```
output
1
80,489
11
160,979
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,490
11
160,980
Tags: implementation Correct Solution: ``` top_score, top_handle = 0, None for _ in range(int(input())): inp = input().split() handle = inp.pop(0) score = (int(inp.pop(0)) * 100 - int(inp.pop(0)) * 50) + sum(map(int, inp)) if top_handle == None or top_score < score: top_score = score top_handle = handle print(top_handle) ```
output
1
80,490
11
160,981
Provide tags and a correct Python 3 solution for this coding contest problem. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist.
instruction
0
80,491
11
160,982
Tags: implementation Correct Solution: ``` n=int(input()) l=[] for i in range(n): d=list(input().split()) s=0 for i in range(1,8): if(i==1): s=s+int(d[i])*100 if(i==2): s=s-int(d[2])*50 else: s=s+int(d[i]) l.append([s,d[0]]) l.sort() print(l[-1][1]) ```
output
1
80,491
11
160,983
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` '''input 2 minus_one 0 4 199 0 0 0 0 minus_two 0 4 198 0 0 0 0 ''' m, name = -1000000000000, "" for _ in range(int(input())): h, plus, minus, a, b, c, d, e = input().split() s = 100*int(plus) - 50*int(minus) + int(a) + int(b) + int(c) + int(d) + int(e) if s > m: m = s name = h print(name) ```
instruction
0
80,492
11
160,984
Yes
output
1
80,492
11
160,985
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` n = int(input()) T, S = '', -1000000000000 for i in range(n): t = input().split() s = int(t[1]) * 100 - int(t[2]) * 50 + int(t[3]) + int(t[4]) + int(t[5]) + int(t[6]) + int(t[7]) if s > S: T, S = t[0], s print(T) ```
instruction
0
80,493
11
160,986
Yes
output
1
80,493
11
160,987
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` l=[] for _ in range(int(input())): a=input().split() a,b=a[0],list(map(int,a[1:])) l+=[(a,b[0]*100-b[1]*50+sum(b[2:]))] print(max(l,key=lambda x:x[1])[0]) ```
instruction
0
80,494
11
160,988
Yes
output
1
80,494
11
160,989
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` total_contestants = int(input()) final_scores = {} for _ in range(total_contestants): handle, successful_hacks, unsuccessful_hacks, *problem_values = input().split() successful_hacks = int(successful_hacks) unsuccessful_hacks = int(unsuccessful_hacks) final_scores[handle] = (successful_hacks * 100) - (unsuccessful_hacks * 50) + sum([int(x) for x in problem_values]) highest_score = max(list(final_scores.values())) handle_with_highest_score = {handle : score_value for (handle, score_value) in final_scores.items() if score_value == highest_score} print(list(handle_with_highest_score.keys())[0]) ```
instruction
0
80,495
11
160,990
Yes
output
1
80,495
11
160,991
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` maxm = 0 ans = '' for _ in range(int(input())): h,p,m,a,b,c,d,e = input().split() if 100*int(p) - 50*int(m) + int(a) + int(b) + int(c) + int(d) + int(e) > maxm: maxm = 100*int(p) - 50*int(m) + int(a) + int(b) + int(c) + int(d) + int(e) ans = str(h) print(ans) ```
instruction
0
80,496
11
160,992
No
output
1
80,496
11
160,993
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` def co(a): i=0 while i<len(a): if a.count(a[i])>1: return 1 i+=1 return 0 a=int(input())+1 b=a c=0 while b>0: b//=10 c+=1 d=list(range(c)) while co(d): d=list(range(c)) i=1 m=a while i<c: d[-i]=m%10 i+=1 m//=10 a+=1 ```
instruction
0
80,497
11
160,994
No
output
1
80,497
11
160,995
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` n = int(input()) winner = '' win_score = -251 for i in range(n): current = list(map(str,input().split())) score = int(current[1])*100 - int(current[2])*50 + int(current[3]) + int(current[4]) +int(current[5]) +int(current[6]) +int(current[7]) if score > win_score : win_score = score winner = current[0] print(winner) ```
instruction
0
80,498
11
160,996
No
output
1
80,498
11
160,997
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Let us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document. In the beginning of the round the contestants are divided into rooms. Each room contains exactly n participants. During the contest the participants are suggested to solve five problems, A, B, C, D and E. For each of these problem, depending on when the given problem was solved and whether it was solved at all, the participants receive some points. Besides, a contestant can perform hacks on other contestants. For each successful hack a contestant earns 100 points, for each unsuccessful hack a contestant loses 50 points. The number of points for every contestant is represented by the sum of points he has received from all his problems, including hacks. You are suggested to determine the leader for some room; the leader is a participant who has maximum points. Input The first line contains an integer n, which is the number of contestants in the room (1 ≤ n ≤ 50). The next n lines contain the participants of a given room. The i-th line has the format of "handlei plusi minusi ai bi ci di ei" — it is the handle of a contestant, the number of successful hacks, the number of unsuccessful hacks and the number of points he has received from problems A, B, C, D, E correspondingly. The handle of each participant consists of Latin letters, digits and underscores and has the length from 1 to 20 characters. There are the following limitations imposed upon the numbers: * 0 ≤ plusi, minusi ≤ 50; * 150 ≤ ai ≤ 500 or ai = 0, if problem A is not solved; * 300 ≤ bi ≤ 1000 or bi = 0, if problem B is not solved; * 450 ≤ ci ≤ 1500 or ci = 0, if problem C is not solved; * 600 ≤ di ≤ 2000 or di = 0, if problem D is not solved; * 750 ≤ ei ≤ 2500 or ei = 0, if problem E is not solved. All the numbers are integer. All the participants have different handles. It is guaranteed that there is exactly one leader in the room (i.e. there are no two participants with the maximal number of points). Output Print on the single line the handle of the room leader. Examples Input 5 Petr 3 1 490 920 1000 1200 0 tourist 2 0 490 950 1100 1400 0 Egor 7 0 480 900 950 0 1000 c00lH4x0R 0 10 150 0 0 0 0 some_participant 2 1 450 720 900 0 0 Output tourist Note The number of points that each participant from the example earns, are as follows: * Petr — 3860 * tourist — 4140 * Egor — 4030 * c00lH4x0R — - 350 * some_participant — 2220 Thus, the leader of the room is tourist. Submitted Solution: ``` ans = ('', -1) n = int(input()) for _ in range(n): inp = input().split() plus, minus, a, b, c, d, e = map(int, inp[1:]) score = 100 * plus - 50 * minus + a + b + c + d + e if score > ans[1]: ans = (inp[0], score) print(ans[0]) ```
instruction
0
80,499
11
160,998
No
output
1
80,499
11
160,999
Provide a correct Python 3 solution for this coding contest problem. The problem set at CODE FESTIVAL 20XX Finals consists of N problems. The score allocated to the i-th (1≦i≦N) problem is i points. Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. Constraints * 1≦N≦10^7 Input The input is given from Standard Input in the following format: N Output Among the sets of problems with the total score of N, find a set in which the highest score of a problem is minimum, then print the indices of the problems in the set in any order, one per line. If there exists more than one such set, any of them will be accepted. Examples Input 4 Output 1 3 Input 7 Output 1 2 4 Input 1 Output 1
instruction
0
80,707
11
161,414
"Correct Solution: ``` N = int(input()) s = 0 ans = [] for i in range(1, N+1): ans.append(i) s += i if s == N: break elif s > N: ans.pop(s-N-1) break for i in ans: print(i) ```
output
1
80,707
11
161,415
Provide a correct Python 3 solution for this coding contest problem. The problem set at CODE FESTIVAL 20XX Finals consists of N problems. The score allocated to the i-th (1≦i≦N) problem is i points. Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. Constraints * 1≦N≦10^7 Input The input is given from Standard Input in the following format: N Output Among the sets of problems with the total score of N, find a set in which the highest score of a problem is minimum, then print the indices of the problems in the set in any order, one per line. If there exists more than one such set, any of them will be accepted. Examples Input 4 Output 1 3 Input 7 Output 1 2 4 Input 1 Output 1
instruction
0
80,708
11
161,416
"Correct Solution: ``` import math n=int(input()) k=(2*n+0.25)**0.5-0.5 k=math.ceil(k) no=k*(k+1)/2-n for i in range(1,k+1): if i==no: continue print(i) ```
output
1
80,708
11
161,417
Provide a correct Python 3 solution for this coding contest problem. The problem set at CODE FESTIVAL 20XX Finals consists of N problems. The score allocated to the i-th (1≦i≦N) problem is i points. Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. Constraints * 1≦N≦10^7 Input The input is given from Standard Input in the following format: N Output Among the sets of problems with the total score of N, find a set in which the highest score of a problem is minimum, then print the indices of the problems in the set in any order, one per line. If there exists more than one such set, any of them will be accepted. Examples Input 4 Output 1 3 Input 7 Output 1 2 4 Input 1 Output 1
instruction
0
80,709
11
161,418
"Correct Solution: ``` n = int(input()) a = [] b = 0 i = 1 while b < n: a.append(i) b += i i += 1 b -= n for i in a: if i != b: print(i) ```
output
1
80,709
11
161,419
Provide a correct Python 3 solution for this coding contest problem. The problem set at CODE FESTIVAL 20XX Finals consists of N problems. The score allocated to the i-th (1≦i≦N) problem is i points. Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. Constraints * 1≦N≦10^7 Input The input is given from Standard Input in the following format: N Output Among the sets of problems with the total score of N, find a set in which the highest score of a problem is minimum, then print the indices of the problems in the set in any order, one per line. If there exists more than one such set, any of them will be accepted. Examples Input 4 Output 1 3 Input 7 Output 1 2 4 Input 1 Output 1
instruction
0
80,710
11
161,420
"Correct Solution: ``` N=int(input()) S=0 i=0 while S<N: i+=1 S+=i T=set() for a in range(i,0,-1): if N>=a: T.add(a) N-=a print("\n".join(map(str,T))) ```
output
1
80,710
11
161,421
Provide a correct Python 3 solution for this coding contest problem. The problem set at CODE FESTIVAL 20XX Finals consists of N problems. The score allocated to the i-th (1≦i≦N) problem is i points. Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. Constraints * 1≦N≦10^7 Input The input is given from Standard Input in the following format: N Output Among the sets of problems with the total score of N, find a set in which the highest score of a problem is minimum, then print the indices of the problems in the set in any order, one per line. If there exists more than one such set, any of them will be accepted. Examples Input 4 Output 1 3 Input 7 Output 1 2 4 Input 1 Output 1
instruction
0
80,711
11
161,422
"Correct Solution: ``` N = int(input()) for i in range(1,N+1): if (i*(i+1))//2>=N: tmp = (i*(i+1))//2-N for j in range(1,i+1): if j != tmp: print(j) exit() ```
output
1
80,711
11
161,423