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 feat... | 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 feat... | 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 feat... | 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 exceed... | 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 exceed... | 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 exceed... | 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 exceed... | 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, h... | 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, h... | 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, h... | 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, h... | 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, h... | 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, h... | 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, h... | 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()))
... | 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, h... | 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 ti... | 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 ti... | 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 ti... | 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 ti... | 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 ti... | 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 ti... | 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 ti... | 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 ti... | 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... | 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 i... | 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
O... | 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
O... | 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".
Examples
Input
0 0
Output
OUT
Input
27 0
O... | 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
O... | 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 parti... | 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 parti... | 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(ha... | 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 parti... | 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
... | 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 parti... | 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... | 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 parti... | 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 parti... | 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 parti... | 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... | 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 parti... | 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... | 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... | 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... | 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... | 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... | 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... | 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... | 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... | 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... | 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 pr... | 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 pr... | 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 pr... | 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 pr... | 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 pr... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.