message
stringlengths
2
20.2k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
757
108k
cluster
float64
4
4
__index_level_0__
int64
1.51k
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't remembers the exact dates but he remembers a segment of days [li, ri] (inclusive) on whi...
instruction
0
99,033
4
198,066
No
output
1
99,033
4
198,067
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't remembers the exact dates but he remembers a segment of days [li, ri] (inclusive) on whi...
instruction
0
99,034
4
198,068
No
output
1
99,034
4
198,069
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't remembers the exact dates but he remembers a segment of days [li, ri] (inclusive) on whi...
instruction
0
99,035
4
198,070
No
output
1
99,035
4
198,071
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't remembers the exact dates but he remembers a segment of days [li, ri] (inclusive) on whi...
instruction
0
99,036
4
198,072
No
output
1
99,036
4
198,073
Provide a correct Python 3 solution for this coding contest problem. Peter is a person with erratic sleep habits. He goes to sleep at twelve o'lock every midnight. He gets up just after one hour of sleep on some days; he may even sleep for twenty-three hours on other days. His sleeping duration changes in a cycle, whe...
instruction
0
99,403
4
198,806
"Correct Solution: ``` import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 10**9+7 dd = [(0,-1),(1,0),(0,1),(-1,0)] ddn = [(0,-1),(1,-1),(1,0),(1,1),(0,1),(-1,-1),(-1,0),(-1,1)] def LI(): return [int...
output
1
99,403
4
198,807
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Peter is a person with erratic sleep habits. He goes to sleep at twelve o'lock every midnight. He gets up just after one hour of sleep on some days; he may even sleep for twenty-three hours on o...
instruction
0
99,404
4
198,808
No
output
1
99,404
4
198,809
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,492
4
198,984
Tags: greedy Correct Solution: ``` # Modified knapsack problem def print_set(n): print(len(n)) n = [str(i) for i in n] print(" ".join(n)) a, b = map(int, input().split()) s = a + b used = 0 k = 1 A = [] B = [] while (used + k) <= s: used += k k += 1 k -= 1 while k > 0: if k <= a: A.app...
output
1
99,492
4
198,985
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,493
4
198,986
Tags: greedy Correct Solution: ``` # import collections, atexit, math, sys, bisect sys.setrecursionlimit(1000000) def getIntList(): return list(map(int, input().split())) try : #raise ModuleNotFoundError import numpy def dprint(*args, **kwargs): print(*args, **kwargs, file=sys.stder...
output
1
99,493
4
198,987
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,494
4
198,988
Tags: greedy Correct Solution: ``` if __name__ == '__main__': a, b = map(int, input().split()) s = a + b best = 0 for i in range(1, s+1): if i * (i+1) // 2 <= s: best = i else: break save_best = best first_day = set() second_day = set() while a != ...
output
1
99,494
4
198,989
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,495
4
198,990
Tags: greedy Correct Solution: ``` def main(): a, b = map(int, input().split()) if a + b == 0: print(0) print(0) return _sum = 0 last = 0 for i in range(1, a + b + 1): _sum += i if _sum == a + b: last = i break elif _sum > a + b...
output
1
99,495
4
198,991
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,496
4
198,992
Tags: greedy Correct Solution: ``` def get_out(list): print(len(list)) out=' '.join(list) print(out) arr = input().split() a = int(arr[0]) b = int(arr[1]) s=a+b temp=0 i=0 while(temp<=s): i+=1 temp+=i i-=1 list_a=[] list_b=[] for x in range(i,0,-1): if(a-x>=0): a-=x ...
output
1
99,496
4
198,993
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,497
4
198,994
Tags: greedy Correct Solution: ``` def main(): a, b = map(int, input().split()) if a + b == 0: print(0) print(0) return _sum = 0 last = 0 for i in range(1, a + b + 1): _sum += i if _sum == a + b: last = i break elif _sum > a + b...
output
1
99,497
4
198,995
Provide tags and a correct Python 3 solution for this coding contest problem. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely. Lesha knows that to...
instruction
0
99,498
4
198,996
Tags: greedy Correct Solution: ``` from math import sqrt # f = open('test.in') def cram_time(): a, b = map(int, input().split()) n = int(sqrt(2 * (a + b)) - 2) while (n + 1) * (n + 2) / 2 <= a + b: n += 1 # print('==============') tasks = list(range(n, 0, -1)) # print('==============')...
output
1
99,498
4
198,997
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend ...
instruction
0
99,499
4
198,998
No
output
1
99,499
4
198,999
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend ...
instruction
0
99,500
4
199,000
No
output
1
99,500
4
199,001
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend ...
instruction
0
99,501
4
199,002
No
output
1
99,501
4
199,003
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend ...
instruction
0
99,502
4
199,004
No
output
1
99,502
4
199,005
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,576
4
199,152
Tags: math Correct Solution: ``` num_of_q = int(input()) d = 24 * 60 for i in range(num_of_q): h, m = [int(i) for i in input().split()] m += h * 60 print(d - m) ```
output
1
99,576
4
199,153
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,577
4
199,154
Tags: math Correct Solution: ``` #!/usr/bin/env python from __future__ import division, print_function import os import sys from io import BytesIO, IOBase if sys.version_info[0] < 3: from __builtin__ import xrange as range from future_builtins import ascii, filter, hex, map, oct, zip def main(): t = int...
output
1
99,577
4
199,155
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,578
4
199,156
Tags: math Correct Solution: ``` q = int(input()) for _ in range(q): h, m = map(int, input().split()) print((24 - h) * 60 - m) ```
output
1
99,578
4
199,157
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,579
4
199,158
Tags: math Correct Solution: ``` n=int(input()) for i in range(n): h,m=map(int,input().split()) hh=(23-h)*60 mm=60-m print(hh+mm) ```
output
1
99,579
4
199,159
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,580
4
199,160
Tags: math Correct Solution: ``` t=int(input()) while(t!=0): a,b=input().split() a=int(a) b=int(b) print((((24-a)*60))-b) t-=1 ```
output
1
99,580
4
199,161
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,581
4
199,162
Tags: math Correct Solution: ``` for _ in range(int(input())): h, m = [int(i) for i in input().split()] temp = h * 60 + m print(24 * 60 - temp) ```
output
1
99,581
4
199,163
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,582
4
199,164
Tags: math Correct Solution: ``` for i in range(int(input())): h,m=[int(s) for s in input().split()] print((24-h)*60-m) ```
output
1
99,582
4
199,165
Provide tags and a correct Python 3 solution for this coding contest problem. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We use 24-hour time format! Your task is to find t...
instruction
0
99,583
4
199,166
Tags: math Correct Solution: ``` t = int(input('')) for v in range(t): a = input('').split(' ') h = int(a[0]) m = int(a[1]) ans = (24-h-1)*60 + 60-m print(ans) ```
output
1
99,583
4
199,167
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,584
4
199,168
Yes
output
1
99,584
4
199,169
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,585
4
199,170
Yes
output
1
99,585
4
199,171
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,586
4
199,172
Yes
output
1
99,586
4
199,173
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,587
4
199,174
Yes
output
1
99,587
4
199,175
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,588
4
199,176
No
output
1
99,588
4
199,177
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,589
4
199,178
No
output
1
99,589
4
199,179
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,590
4
199,180
No
output
1
99,590
4
199,181
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. New Year is coming and you are excited to know how many minutes remain before the New Year. You know that currently the clock shows h hours and m minutes, where 0 ≤ hh < 24 and 0 ≤ mm < 60. We u...
instruction
0
99,591
4
199,182
No
output
1
99,591
4
199,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Natasha was already going to fly back to Earth when she remembered that she needs to go to the Martian store to buy Martian souvenirs for her friends. It is known, that the Martian year lasts x...
instruction
0
101,191
4
202,382
No
output
1
101,191
4
202,383
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Natasha was already going to fly back to Earth when she remembered that she needs to go to the Martian store to buy Martian souvenirs for her friends. It is known, that the Martian year lasts x...
instruction
0
101,192
4
202,384
No
output
1
101,192
4
202,385
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Natasha was already going to fly back to Earth when she remembered that she needs to go to the Martian store to buy Martian souvenirs for her friends. It is known, that the Martian year lasts x...
instruction
0
101,193
4
202,386
No
output
1
101,193
4
202,387
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Natasha was already going to fly back to Earth when she remembered that she needs to go to the Martian store to buy Martian souvenirs for her friends. It is known, that the Martian year lasts x...
instruction
0
101,194
4
202,388
No
output
1
101,194
4
202,389
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,197
4
202,394
Tags: *special, brute force Correct Solution: ``` def g(a): return((a[0],-a[1])) n=int(input()) r=list(map(int,input().split())) partials=[] sumi=0 for i in range(n): sumi+=r[i]-100 partials.append((sumi,i+1)) partials.append((0,0)) partials.sort(key=g) mini=n+1 long=0 for i in range(n+1): if partials[i...
output
1
101,197
4
202,395
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,198
4
202,396
Tags: *special, brute force Correct Solution: ``` n = int(input()) l = list(map(int,input().split())) p = [0] s = 0 for i in l: s+=i p.append(s) mx = 0 for i in range(1,n+1): if(p[i]>100*i): mx = max(mx,i) else: for j in range(i): if(p[i]-p[j]>100*(i-j)): mx =...
output
1
101,198
4
202,397
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,199
4
202,398
Tags: *special, brute force Correct Solution: ``` n=int(input()) l=list(map(int,input().split())) m=0 for i in range(n): s=0 for j in range(i,n): s=s+l[j] if(s>(j-i+1)*100): m=max(m,j-i+1) print(m) ```
output
1
101,199
4
202,399
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,200
4
202,400
Tags: *special, brute force Correct Solution: ``` n = int(input()) ri = list(map(int,input().split())) ar = [0] * (n+1) ar[1] = ri[0] for i in range(1,n): ar[i+1] = ar[i] + ri[i] ans = 0 for i in range(n+1): for j in range(i+1,n+1): num = ar[j] - ar[i] num2 = j - i if num > num2 * 100: ...
output
1
101,200
4
202,401
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,201
4
202,402
Tags: *special, brute force Correct Solution: ``` n = int(input()) numbers = [int(x) - 100 for x in input().split()] maxi = 0 acc_index = -1 for acc_index in range(n): suma = 0 for index in range(acc_index, n): suma = suma + numbers[index] if suma > 0: maxi = max(maxi, index-acc_index+1) print(ma...
output
1
101,201
4
202,403
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,202
4
202,404
Tags: *special, brute force Correct Solution: ``` n = int(input()) a = list(map(int, input().split())) pref = [0] * (n + 1) for i in range(1, n + 1): pref[i] = pref[i - 1] + a[i - 1] res = 0 for l in range(1, n + 1): for r in range(l, n + 1): if (pref[r] - pref[l - 1] > 100 * (r - l + 1)): res = max(res, r - l...
output
1
101,202
4
202,405
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,203
4
202,406
Tags: *special, brute force Correct Solution: ``` import sys input = sys.stdin.readline ''' ''' n = int(input()) r = list(map(int, input().split())) prefix_sum = [r[0]] for i in range(1, n): prefix_sum.append(prefix_sum[-1] + r[i]) best = 0 done = False for length in reversed(range(1,n+1)): treshold = 100*l...
output
1
101,203
4
202,407
Provide tags and a correct Python 3 solution for this coding contest problem. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds 100 ⋅ t, where t — the number of seco...
instruction
0
101,204
4
202,408
Tags: *special, brute force Correct Solution: ``` n = int(input()) r = list(map(int, input().split())) s = [0] * n s[0] = r[0] for i in range(1, n): s[i] = s[i - 1] + r[i] ans = 0 for i in range(n): for j in range(i, n): num = s[j] - s[i] + r[i] time = j + 1 - i if num / time > 100 and...
output
1
101,204
4
202,409
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of tim...
instruction
0
101,205
4
202,410
Yes
output
1
101,205
4
202,411
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of tim...
instruction
0
101,206
4
202,412
Yes
output
1
101,206
4
202,413
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of tim...
instruction
0
101,207
4
202,414
Yes
output
1
101,207
4
202,415
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of tim...
instruction
0
101,208
4
202,416
Yes
output
1
101,208
4
202,417
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. We get more and more news about DDoS-attacks of popular websites. Arseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of tim...
instruction
0
101,209
4
202,418
No
output
1
101,209
4
202,419