message
stringlengths
2
45.8k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
254
108k
cluster
float64
3
3
__index_level_0__
int64
508
217k
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,199
3
56,398
Yes
output
1
28,199
3
56,399
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,200
3
56,400
Yes
output
1
28,200
3
56,401
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,201
3
56,402
No
output
1
28,201
3
56,403
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,202
3
56,404
No
output
1
28,202
3
56,405
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,203
3
56,406
No
output
1
28,203
3
56,407
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems to be habitable. The planet, named JOI, is a harsh planet with three types of terrai...
instruction
0
28,204
3
56,408
No
output
1
28,204
3
56,409
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Milky Way Milky Way English text is not available in this practice contest. The Milky Way Transportation Corporation is a travel agency that plans and manages interstellar travel tours. The M...
instruction
0
28,212
3
56,424
No
output
1
28,212
3
56,425
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Zxr960115 is owner of a large farm. He feeds m cute cats and employs p feeders. There's a straight road across the farm and n hills along the road, numbered from 1 to n from left to right. The d...
instruction
0
28,572
3
57,144
No
output
1
28,572
3
57,145
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Zxr960115 is owner of a large farm. He feeds m cute cats and employs p feeders. There's a straight road across the farm and n hills along the road, numbered from 1 to n from left to right. The d...
instruction
0
28,573
3
57,146
No
output
1
28,573
3
57,147
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Zxr960115 is owner of a large farm. He feeds m cute cats and employs p feeders. There's a straight road across the farm and n hills along the road, numbered from 1 to n from left to right. The d...
instruction
0
28,574
3
57,148
No
output
1
28,574
3
57,149
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Zxr960115 is owner of a large farm. He feeds m cute cats and employs p feeders. There's a straight road across the farm and n hills along the road, numbered from 1 to n from left to right. The d...
instruction
0
28,575
3
57,150
No
output
1
28,575
3
57,151
Provide a correct Python 3 solution for this coding contest problem. Create a program that calculates and outputs the surface distance by inputting the north latitude and east longitude of two cities on the earth. However, the earth is a sphere with a radius of 6,378.1 km, and the surface distance between two points i...
instruction
0
28,997
3
57,994
"Correct Solution: ``` from math import pi, acos, cos, sin while 1: *S, = map(float, input().split()) if all(e == -1 for e in S): break a, b, c, d = map(lambda x: pi * x / 180., S) x = 6378.1 * acos(sin(a)*sin(c) + cos(a)*cos(c)*cos(b-d)) print(round(x)) ```
output
1
28,997
3
57,995
Provide a correct Python 3 solution for this coding contest problem. Create a program that calculates and outputs the surface distance by inputting the north latitude and east longitude of two cities on the earth. However, the earth is a sphere with a radius of 6,378.1 km, and the surface distance between two points i...
instruction
0
28,998
3
57,996
"Correct Solution: ``` import math while 1: a, b, c, d = map(float, input().split()) if a == -1: break a = (a / 360) * 2 * math.pi b = (b / 360) * 2 * math.pi c = (c / 360) * 2 * math.pi d = (d / 360) * 2 * math.pi x1 = math.cos(b) * math.cos(a) y1 = math.sin(b) * math.cos(a) ...
output
1
28,998
3
57,997
Provide a correct Python 3 solution for this coding contest problem. Create a program that calculates and outputs the surface distance by inputting the north latitude and east longitude of two cities on the earth. However, the earth is a sphere with a radius of 6,378.1 km, and the surface distance between two points i...
instruction
0
29,000
3
58,000
"Correct Solution: ``` from math import acos,sin,cos,radians while 1: a,b,c,d=map(float,input().split()) if a==b==c==d==-1:break a,c=radians(a),radians(c) print(int(6378.1*acos(sin(a)*sin(c) + cos(a)*cos(c)*cos(radians(d)-radians(b)))+0.5)) ```
output
1
29,000
3
58,001
Provide a correct Python 3 solution for this coding contest problem. Create a program that calculates and outputs the surface distance by inputting the north latitude and east longitude of two cities on the earth. However, the earth is a sphere with a radius of 6,378.1 km, and the surface distance between two points i...
instruction
0
29,001
3
58,002
"Correct Solution: ``` import math r = 6378.1 def getRadian(degree): return degree * math.pi / 180 while(1): a,b,c,d = (float(x) for x in input().split()) if a == -1 and b == -1 and c == -1 and d == -1: break cos = math.cos(getRadian(a)) * math.cos(getRadian(c)) * math.cos(getRadian(b) - getRa...
output
1
29,001
3
58,003
Provide a correct Python 3 solution for this coding contest problem. Problem G Rendezvous on a Tetrahedron One day, you found two worms $P$ and $Q$ crawling on the surface of a regular tetrahedron with four vertices $A$, $B$, $C$ and $D$. Both worms started from the vertex $A$, went straight ahead, and stopped crawli...
instruction
0
29,038
3
58,076
"Correct Solution: ``` from math import cos, sin, pi, sqrt B = ["BC", "CD", "DB"] XY0, d0, l0, XY1, d1, l1 = open(0).read().split() d0, l0, d1, l1 = map(int, [d0, l0, d1, l1]) def calc(XY, d, l): angle = B.index(XY) * 60 + d x = l * cos(pi*angle/180) y = l * sin(pi*angle/180) x = x + y/sqrt(3) y = ...
output
1
29,038
3
58,077
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Problem G Rendezvous on a Tetrahedron One day, you found two worms $P$ and $Q$ crawling on the surface of a regular tetrahedron with four vertices $A$, $B$, $C$ and $D$. Both worms started from...
instruction
0
29,039
3
58,078
No
output
1
29,039
3
58,079
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a far away galaxy there are n inhabited planets, numbered with numbers from 1 to n. They are located at large distances from each other, that's why the communication between them was very dif...
instruction
0
29,507
3
59,014
No
output
1
29,507
3
59,015
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. In a far away galaxy there are n inhabited planets, numbered with numbers from 1 to n. They are located at large distances from each other, that's why the communication between them was very dif...
instruction
0
29,508
3
59,016
No
output
1
29,508
3
59,017
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,835
3
59,670
"Correct Solution: ``` def solve(): _,*l=map(int,open(0).read().split()) print("YNeos"[any((t+x+y)%2+(t<x+y)for t,x,y in zip(*[iter(l)]*3))::2]) if __name__=="__main__": solve() ```
output
1
29,835
3
59,671
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,836
3
59,672
"Correct Solution: ``` n = int(input()) count = 0 for i in range(n): t,x,y = map(int,input().split()) if (x + y <= t and t % 2 == (x + y) % 2): continue else: print("No") exit() print("Yes") ```
output
1
29,836
3
59,673
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,837
3
59,674
"Correct Solution: ``` N = int(input()) flag = True for i in range(N): t,x,y = map(int, input().split()) if x+y>t or t%2 !=(x+y)%2: flag=False break print("Yes" if flag else "No") ```
output
1
29,837
3
59,675
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,838
3
59,676
"Correct Solution: ``` n = int(input()) for _ in range(1, n+1): t, x, y = map(int, input().split()) # x+yは毎秒ごとに必ず偶奇が入れ替わる、といったパリティに関する考え方が重要 if (x + y) > t or (x + y + t) % 2: print("No") exit() print("Yes") ```
output
1
29,838
3
59,677
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,839
3
59,678
"Correct Solution: ``` N = int(input()) ans = "Yes" i = 0 while i < N: t,x,y = [int(num) for num in input().split()] if x+y <= t and (t-x-y)%2 == 0: i += 1 else: ans = "No" break print(ans) ```
output
1
29,839
3
59,679
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,840
3
59,680
"Correct Solution: ``` n = int(input()) a = [] for i in range(n): a.append(list(map(int, input().split()))) for i in a: if i[0] < i[1] + i[2] or sum(i) % 2: print("No") exit() print("Yes") ```
output
1
29,840
3
59,681
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,841
3
59,682
"Correct Solution: ``` n=int(input()) tt,xx,yy=0,0,0 ans=0 for i in range(n): t,x,y=map(int,input().split()) if (x-xx+y-yy)%2!=(t-tt)%2: ans=1 if x-xx+y-yy>t-tt: ans=1 tt,xx,yy=t,x,y print("YNeos"[ans::2]) ```
output
1
29,841
3
59,683
Provide a correct Python 3 solution for this coding contest problem. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time ...
instruction
0
29,842
3
59,684
"Correct Solution: ``` n = int(input()) for _ in range(n): t, x, y = map(int, input().split()) if t < x + y or (x + y + t) % 2: print('No') exit() print('Yes') ```
output
1
29,842
3
59,685
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,843
3
59,686
Yes
output
1
29,843
3
59,687
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,844
3
59,688
Yes
output
1
29,844
3
59,689
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,845
3
59,690
Yes
output
1
29,845
3
59,691
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,846
3
59,692
Yes
output
1
29,846
3
59,693
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,847
3
59,694
No
output
1
29,847
3
59,695
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,848
3
59,696
No
output
1
29,848
3
59,697
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,849
3
59,698
No
output
1
29,849
3
59,699
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_...
instruction
0
29,850
3
59,700
No
output
1
29,850
3
59,701
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Seen from above, there is a grid-like square shaped like Figure 1. The presence or absence of "walls" on each side of this grid is represented by a sequence of 0s and 1s. Create a program that s...
instruction
0
29,911
3
59,822
No
output
1
29,911
3
59,823
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Berland — is a huge country with diverse geography. One of the most famous natural attractions of Berland is the "Median mountain range". This mountain range is n mountain peaks, located on one ...
instruction
0
30,225
3
60,450
No
output
1
30,225
3
60,451
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Berland — is a huge country with diverse geography. One of the most famous natural attractions of Berland is the "Median mountain range". This mountain range is n mountain peaks, located on one ...
instruction
0
30,226
3
60,452
No
output
1
30,226
3
60,453
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Berland — is a huge country with diverse geography. One of the most famous natural attractions of Berland is the "Median mountain range". This mountain range is n mountain peaks, located on one ...
instruction
0
30,227
3
60,454
No
output
1
30,227
3
60,455
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Berland — is a huge country with diverse geography. One of the most famous natural attractions of Berland is the "Median mountain range". This mountain range is n mountain peaks, located on one ...
instruction
0
30,228
3
60,456
No
output
1
30,228
3
60,457
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,281
3
60,562
Tags: implementation Correct Solution: ``` def check(x1 , y1, x2, y2, d): return (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) <= d*d xa, ya, xb, yb = map(int,input().split()) if xa > xb : xa, xb = xb, xa if ya > yb : ya, yb = yb, ya n = int(input()) r = [] i = 0 while i < n: r.append(list(map(int,input().split()))) i...
output
1
30,281
3
60,563
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,282
3
60,564
Tags: implementation Correct Solution: ``` import sys def eucledian_dis(c, c1): x1, y1 = c[0], c[1] x, y = c1[0], c1[1] r = c1[2] if ((x - x1)**2 + (y - y1)**2)**(0.5) <= r: return True return False xa, ya, xb, yb = map(int, sys.stdin.readline().strip().split()) lis = [] for i in range(min(ya, yb), max(yb, ya) ...
output
1
30,282
3
60,565
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,283
3
60,566
Tags: implementation Correct Solution: ``` from collections import deque x1, y1, x2, y2 = map(int, input().split()) n = int(input()) x = [None]*n y = [None]*n r = [None]*n taken = {} for i in range(n): x[i], y[i], r[i] = map(int, input().split()) if x1 > x2: x1, x2 = x2, x1 if y1 > y2: y1, y2 = y2, y1 def dist...
output
1
30,283
3
60,567
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,284
3
60,568
Tags: implementation Correct Solution: ``` import math def dist(a, b, c, d): return math.sqrt((a - c) ** 2 + (b - d) ** 2) class CodeforcesTask144BSolution: def __init__(self): self.result = '' self.x_y_x_y = [] self.n = 0 self.radiators = [] def read_input(self): ...
output
1
30,284
3
60,569
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,285
3
60,570
Tags: implementation Correct Solution: ``` xa, ya, xb, yb = [int(i) for i in input().split()] l = [] cnt = (abs(xa-xb)+1) *2 + (abs(ya-yb)-1)*2 x1, x2, y1, y2 = min(xa, xb), max(xa, xb), min(ya, yb), max(ya, yb) for i in range(x1, x2+1): for j in range(y1, y2+1): if i == x1 or i == x2 or j ==y1 or y2 == ...
output
1
30,285
3
60,571
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,286
3
60,572
Tags: implementation Correct Solution: ``` def f(i, t, Y, c): arr, res = [(t,t)], 0 for x, y, r in c: d = r - (y-Y)**2 if d < 0: continue d = int(d**.5) arr.append((x-d, x+d+1)) for a, b in sorted(arr): if i < a and i < t: res += a - i ...
output
1
30,286
3
60,573
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,287
3
60,574
Tags: implementation Correct Solution: ``` a,b,c,d=map(int,input().split()) if a>c:a,c=c,a if b>d:b,d=d,b z=[tuple(map(int,input().split())) for _ in " "*int(input())] ans=0 for i in range(a,c+1): for x,y,r in z: if (i-x)**2+(y-b)**2<=r**2:break else:ans+=1 for i in range(b+1,d): for x,y,r in z: ...
output
1
30,287
3
60,575
Provide tags and a correct Python 3 solution for this coding contest problem. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The meeting table is represented as a rectangle wh...
instruction
0
30,288
3
60,576
Tags: implementation Correct Solution: ``` xa, ya, xb, yb = map(int, input().split()) s, t = 0, [tuple(map(int, input().split())) for i in range(int(input()))] if xa > xb: xa, xb = xb, xa if ya > yb: ya, yb = yb, ya for y in [ya, yb]: p = [(u, v, r) for u, v, r in t if abs(v - y) <= r] for x in range(xa,...
output
1
30,288
3
60,577
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The...
instruction
0
30,289
3
60,578
Yes
output
1
30,289
3
60,579
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The Super Duper Secret Meeting of the Super Duper Secret Military Squad takes place in a Super Duper Secret Place. The place is an infinite plane with introduced Cartesian coordinate system. The...
instruction
0
30,290
3
60,580
Yes
output
1
30,290
3
60,581