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. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,282
4
152,564
Yes
output
1
76,282
4
152,565
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,283
4
152,566
Yes
output
1
76,283
4
152,567
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,284
4
152,568
Yes
output
1
76,284
4
152,569
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,285
4
152,570
Yes
output
1
76,285
4
152,571
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,287
4
152,574
No
output
1
76,287
4
152,575
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,288
4
152,576
No
output
1
76,288
4
152,577
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunatel...
instruction
0
76,289
4
152,578
No
output
1
76,289
4
152,579
Provide a correct Python 3 solution for this coding contest problem. Animation is one of methods for making movies and in Japan, it is popular to broadcast as a television program or perform as a movie. Many people, especially the young, love one. And here is an anime lover called Jack. We say he is an mysterious guy ...
instruction
0
77,527
4
155,054
"Correct Solution: ``` # AOJ 1063: Watchin' TVA # Python3 2018.7.8 bal4u while True: n = int(input()) if n == 0: break dic, tbl = {}, [] for i in range(n): nm, w, s = input().split() w, s = int(w), int(s) h, m = s//100, s%100 s = (1440*w + h*60 + m) % 10080 e = s + 30; tbl.append([s, e, 0, nm]) dic[n...
output
1
77,527
4
155,055
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Cool J has recently become a businessman Mr. Jackson, and he has to make a lot of phone calls now. Today he has n calls planned. For each call we know the moment ti (in seconds since the start o...
instruction
0
78,536
4
157,072
No
output
1
78,536
4
157,073
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Cool J has recently become a businessman Mr. Jackson, and he has to make a lot of phone calls now. Today he has n calls planned. For each call we know the moment ti (in seconds since the start o...
instruction
0
78,537
4
157,074
No
output
1
78,537
4
157,075
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Cool J has recently become a businessman Mr. Jackson, and he has to make a lot of phone calls now. Today he has n calls planned. For each call we know the moment ti (in seconds since the start o...
instruction
0
78,538
4
157,076
No
output
1
78,538
4
157,077
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,661
4
157,322
Yes
output
1
78,661
4
157,323
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,662
4
157,324
Yes
output
1
78,662
4
157,325
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,663
4
157,326
Yes
output
1
78,663
4
157,327
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,664
4
157,328
Yes
output
1
78,664
4
157,329
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,665
4
157,330
No
output
1
78,665
4
157,331
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,666
4
157,332
No
output
1
78,666
4
157,333
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,667
4
157,334
No
output
1
78,667
4
157,335
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, the...
instruction
0
78,668
4
157,336
No
output
1
78,668
4
157,337
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,713
4
157,426
Tags: implementation, math Correct Solution: ``` #http://codeforces.com/contest/652/problem/A # h_cat, h_app, day_up, day_down = [map(int, input().split()), map(int,input().split())] def dprint(str): pstatus = False if pstatus == True: print(str) def check_cat(): from math import ceil from operator import add...
output
1
78,713
4
157,427
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,714
4
157,428
Tags: implementation, math Correct Solution: ``` import math h1, h2 = map(int, input().split()) a, b = map(int, input().split()) d, v = h2 - h1 - 8 * a, 12 * (a - b) if d <= 0: print(0) elif b >= a: print(-1) else: print(math.ceil(d/v)) ```
output
1
78,714
4
157,429
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,715
4
157,430
Tags: implementation, math Correct Solution: ``` h1,h2=map(int,input().split()) a,b=map(int,input().split()) hc=h1 if(b>=a and h2>h1+8*a): print(-1) else: d=0;hc=h1+8*a # if(hc>=h2): # print(0) # else: while(hc<h2): d+=1 hc+=(12*a-12*b) print(d) ```
output
1
78,715
4
157,431
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,716
4
157,432
Tags: implementation, math Correct Solution: ``` h1, h2 = map(int, input().split()) a, b = map(int, input().split()) day = 0 while h1 < h2: if day == 0: h1 += a * 8 if h1 < h2 and b >= a: print(-1) break elif h1 < h2: h1 -= b * 12 day += 1 ...
output
1
78,716
4
157,433
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,717
4
157,434
Tags: implementation, math Correct Solution: ``` from collections import deque, defaultdict, Counter from itertools import product, groupby, permutations, combinations from math import gcd, floor, inf from bisect import bisect_right, bisect_left h1, h2 = map(int, input().split()) h2 -= h1 a, b = map(int, input().split...
output
1
78,717
4
157,435
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,718
4
157,436
Tags: implementation, math Correct Solution: ``` h1,h2=map(int,input().split()) a,b= map(int,input().split()) if (h1+(8*a)) >= h2: print(0) elif a>b: cal = h2 - h1 - 8 * a; cal2 = 12 * (a - b); ans = (cal + cal2 - 1) // cal2; print(ans) else: print(-1) ```
output
1
78,718
4
157,437
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,719
4
157,438
Tags: implementation, math Correct Solution: ``` from collections import * import os, sys from io import BytesIO, IOBase def main(): h1, h2 = rints() a, b = rints() h1 += 8 * a if h1 >= h2: print(0) elif a <= b: print(-1) else: be, en = 1, 10 ** 6 while be < en...
output
1
78,719
4
157,439
Provide tags and a correct Python 3 solution for this coding contest problem. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2 > h1) on the same tree hung an apple and the c...
instruction
0
78,720
4
157,440
Tags: implementation, math Correct Solution: ``` a,b = map(int,input().split()) c,d = map(int,input().split()) f = 0 a = a-(c*4) while True: a += c*12 if a >= b: break elif d>=c: f = -1 break else: a -= d*12 f += 1 print(f) ```
output
1
78,720
4
157,441
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,721
4
157,442
Yes
output
1
78,721
4
157,443
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,722
4
157,444
Yes
output
1
78,722
4
157,445
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,724
4
157,448
Yes
output
1
78,724
4
157,449
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,725
4
157,450
No
output
1
78,725
4
157,451
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,726
4
157,452
No
output
1
78,726
4
157,453
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,727
4
157,454
No
output
1
78,727
4
157,455
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h1 cm from the ground. On the height h2 cm (h2...
instruction
0
78,728
4
157,456
No
output
1
78,728
4
157,457
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,749
4
157,498
Tags: brute force, implementation Correct Solution: ``` n=int(input()) s=input().split(':') hh=s[0] mm=s[1] h=hh m=mm if(n==12): if(int(hh)>12 and int(hh)%10!=0): h="0"+hh[1] elif(int(hh)>12): h="10" if(int(hh)==0): h="10" if(int(mm)>59): m="0"+mm[1] else: if(int(hh)>23): h="0"+hh[1] if(int(mm)>5...
output
1
78,749
4
157,499
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,750
4
157,500
Tags: brute force, implementation Correct Solution: ``` n=int(input()) s=input() hr,mn=s[:2],s[3:] h,m=int(hr),int(mn) if n==24: if h<24 and m<60: print(hr+":"+mn) elif h>=24 and m>60: print('0'+hr[1]+":0"+mn[1]) elif m>=60: print(hr+":0"+mn[1]) else: print("0"+hr[1]+":"+...
output
1
78,750
4
157,501
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,751
4
157,502
Tags: brute force, implementation Correct Solution: ``` f = int(input()) h, m = map(list, input().split(":")) h = list(map(int, h)) m = list(map(int, m)) if f == 12: if h[0] == 0 and h[1] == 0: h[1] = 1 elif h[0] == 1: if h[1] > 2: h[1] = 0 elif h[0] > 1: if h[1] == 0: ...
output
1
78,751
4
157,503
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,752
4
157,504
Tags: brute force, implementation Correct Solution: ``` w=int(input('')) q=input('') qe=q[0] qr=q[1] qq=qe+qr wq=q[3] we=q[4] ww=wq+we if w==12: qq=int(qq) ww=int(ww) qe=int(qe) if qq==00: qr='1' if qq>12: if qe>0: qq='1'+qr qq=int(qq) if qq>12: ...
output
1
78,752
4
157,505
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,753
4
157,506
Tags: brute force, implementation Correct Solution: ``` def get(x): if (x < 10): return "0" + str(x) return str(x) def diff(a, b): ans = 0 for i in range(len(a)): if (a[i] != b[i]): ans += 1 return ans x = int(input()) s = input() if (x == 12): best = "01:30" f...
output
1
78,753
4
157,507
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,754
4
157,508
Tags: brute force, implementation Correct Solution: ``` '''input 24 24:00 ''' n = int(input()) a, b = map(int, input().split(":")) if b > 59: b = "0" + str(b)[-1] if a > n or a == 24: a = "0" + str(a)[-1] if n == 12 and int(a) % 10 == 0: a = "1" + str(a)[-1] if int(a) > 12: a = "10" if a == 0 and n == 12: a = "0...
output
1
78,754
4
157,509
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,755
4
157,510
Tags: brute force, implementation Correct Solution: ``` # your code goes here t = input() t = int(t) x,y = input().split(':') x = int(x) y = int(y) if(t==24): if(x>23): x = x%10 if(y>59): y = y%10 else: if(y>59): y = y%10 else: if(x==0): x = 1 if(y>59): y = y%10 elif(x>12): if(x%10==0): x=...
output
1
78,755
4
157,511
Provide tags and a correct Python 3 solution for this coding contest problem. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23. In both formats minutes change from 0 to 59. ...
instruction
0
78,756
4
157,512
Tags: brute force, implementation Correct Solution: ``` # 722A # θ(1) time # θ(1) space __author__ = 'artyom' # SOLUTION def main(): s = read(0) t = read(0).split(':') if s == '12': if t[0][1] == '0': t[0] = '10' elif int(t[0]) > 12: t[0] = '0' + t[0][1] elif ...
output
1
78,756
4
157,513
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,757
4
157,514
Yes
output
1
78,757
4
157,515
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,758
4
157,516
Yes
output
1
78,758
4
157,517
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,759
4
157,518
Yes
output
1
78,759
4
157,519
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,760
4
157,520
Yes
output
1
78,760
4
157,521
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,761
4
157,522
No
output
1
78,761
4
157,523
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,762
4
157,524
No
output
1
78,762
4
157,525
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,763
4
157,526
No
output
1
78,763
4
157,527
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format hours change from 1 to 12, while in 24-hours it changes from 0 to 23....
instruction
0
78,764
4
157,528
No
output
1
78,764
4
157,529