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. 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,291
3
60,582
Yes
output
1
30,291
3
60,583
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,292
3
60,584
Yes
output
1
30,292
3
60,585
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,293
3
60,586
No
output
1
30,293
3
60,587
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,294
3
60,588
No
output
1
30,294
3
60,589
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,295
3
60,590
No
output
1
30,295
3
60,591
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,296
3
60,592
No
output
1
30,296
3
60,593
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game t...
instruction
0
30,597
3
61,194
No
output
1
30,597
3
61,195
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game t...
instruction
0
30,598
3
61,196
No
output
1
30,598
3
61,197
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game t...
instruction
0
30,599
3
61,198
No
output
1
30,599
3
61,199
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game t...
instruction
0
30,600
3
61,200
No
output
1
30,600
3
61,201
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,904
3
61,808
"Correct Solution: ``` from heapq import heappush, heappop R_next = tuple((x, y) for x in range(-3, 0) for y in range(-2, 3) if abs(x) + abs(y) <= 3) L_next = tuple((x, y) for x in range(1, 4) for y in range(-2, 3) if abs(x) + abs(y) <= 3) c_num = tuple(str(i) for i in range(10)) L, R = 0, 1 INF = 10 ** 20 def conv(c...
output
1
30,904
3
61,809
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,905
3
61,810
"Correct Solution: ``` import sys sys.setrecursionlimit(10000000) MOD = 10 ** 9 + 7 INF = 10 ** 15 from heapq import heapify,heappop,heappush def solve(H,W): grid = [input().split() for _ in range(H)] dist = [[[INF]*2 for _ in range(W)] for _ in range(H)] q = [] #find start and goal g = [] for...
output
1
30,905
3
61,811
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,906
3
61,812
"Correct Solution: ``` import sys import heapq input = sys.stdin.readline def main(): while True: w, h = map(int, input().split()) if w == 0: break board = [input().strip().split() for i in range(h)] check = [[[False, False] for i in range(w)] for j in range(h)] ...
output
1
30,906
3
61,813
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,907
3
61,814
"Correct Solution: ``` from heapq import heappush, heappop R_next = tuple((x, y) for x in range(-3, 0) for y in range(-2, 3) if abs(x) + abs(y) <= 3) L_next = tuple((x, y) for x in range(1, 4) for y in range(-2, 3) if abs(x) + abs(y) <= 3) c_num = tuple(str(i) for i in range(10)) L, R = 0, 1 INF = 10 ** 20 def conv(c...
output
1
30,907
3
61,815
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,908
3
61,816
"Correct Solution: ``` import sys from collections import defaultdict from heapq import heappop,heappush MA = 1000000 def v(y,x,d): if (x == 0 and d) or (x == w-1 and not d): return [] k = 1-2*d l = [(i,x+k) for i in range(max(0,y-2),min(h,y+3))] if (x == 1 and d) or (x == w-2 and not d): ...
output
1
30,908
3
61,817
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,909
3
61,818
"Correct Solution: ``` import sys import math import bisect import heapq import copy sys.setrecursionlimit(1000000) from collections import deque from itertools import permutations def main(): dy = [-2,-1,0,1,2,-1,0,1,0] rx = [1,1,1,1,1,2,2,2,3] lx = [-1,-1,-1,-1,-1,-2,-2,-2,-3] inf = 1000000007 ...
output
1
30,909
3
61,819
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,910
3
61,820
"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 = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int...
output
1
30,910
3
61,821
Provide a correct Python 3 solution for this coding contest problem. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has sl...
instruction
0
30,911
3
61,822
"Correct Solution: ``` from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,copy,time sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inp(): return int(input()) def inpl(): return list(map(int, input().split())) def inpl_str(): return list(input()....
output
1
30,911
3
61,823
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his f...
instruction
0
30,912
3
61,824
Yes
output
1
30,912
3
61,825
Provide a correct Python 3 solution for this coding contest problem. Adam Ivan is working as a system administrator at Soy Group, Inc. He is now facing at a big trouble: a number of computers under his management have been infected by a computer virus. Unfortunately, anti-virus system in his company failed to detect t...
instruction
0
30,925
3
61,850
"Correct Solution: ``` while True: n, m = map(int, input().split()) if n == m == 0: break data = [list(map(int, input().split())) for i in range(m)] data.sort() infect = [False for i in range(n + 1)] infect[1] = True for t, s, d in data: if infect[s]: infect[d] ...
output
1
30,925
3
61,851
Provide tags and a correct Python 3 solution for this coding contest problem. By 2312 there were n Large Hadron Colliders in the inhabited part of the universe. Each of them corresponded to a single natural number from 1 to n. However, scientists did not know what activating several colliders simultaneously could caus...
instruction
0
31,247
3
62,494
Tags: math, number theory Correct Solution: ``` n, m = map(int, input().split()) n += 1 s = [[] for i in range(n)] for j in range(2, n, 2): s[j] = [2] for i in range(3, n, 2): if s[i]: continue for j in range(i, n, i): s[j].append(i) p, d, r = {}, set(), [''] * m for j in range(m): t = input() ...
output
1
31,247
3
62,495
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,325
3
62,650
Tags: *special Correct Solution: ``` l = [0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0] k = int(input()) print(l[k]) ```
output
1
31,325
3
62,651
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,326
3
62,652
Tags: *special Correct Solution: ``` v = [1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0] print(v[int(input())-1]) ```
output
1
31,326
3
62,653
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,327
3
62,654
Tags: *special Correct Solution: ``` a=['1','0','0','1','0','1','0','1','1','1','0','0','1','0','1','0'] print(a[int(input())-1]) ```
output
1
31,327
3
62,655
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,328
3
62,656
Tags: *special Correct Solution: ``` s = "A1001010111001010";print(s[int(input())]) ```
output
1
31,328
3
62,657
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,329
3
62,658
Tags: *special Correct Solution: ``` print('.1001010111001010'[int(input())]) ```
output
1
31,329
3
62,659
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,330
3
62,660
Tags: *special Correct Solution: ``` # Nile? a=[1,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0] print(a[int(input())-1]) ```
output
1
31,330
3
62,661
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,331
3
62,662
Tags: *special Correct Solution: ``` g=[0,1,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0] z=int(input()) print(g[z]) ```
output
1
31,331
3
62,663
Provide tags and a correct Python 3 solution for this coding contest problem. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to ...
instruction
0
31,332
3
62,664
Tags: *special Correct Solution: ``` """ Codeforces April Fools Contest 2014 Problem D Author : chaotic_iak Language: Python 3.3.4 """ class InputHandlerObject(object): inputs = [] def getInput(self, n = 0): res = "" inputs = self.inputs if not inputs: inputs.extend(input().split(" "...
output
1
31,332
3
62,665
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,333
3
62,666
Yes
output
1
31,333
3
62,667
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,334
3
62,668
Yes
output
1
31,334
3
62,669
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,335
3
62,670
Yes
output
1
31,335
3
62,671
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,336
3
62,672
Yes
output
1
31,336
3
62,673
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,337
3
62,674
No
output
1
31,337
3
62,675
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,338
3
62,676
No
output
1
31,338
3
62,677
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,339
3
62,678
No
output
1
31,339
3
62,679
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The ...
instruction
0
31,340
3
62,680
No
output
1
31,340
3
62,681
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arkady the air traffic controller is now working with n planes in the air. All planes move along a straight coordinate axis with Arkady's station being at point 0 on it. The i-th plane, small en...
instruction
0
31,516
3
63,032
No
output
1
31,516
3
63,033
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arkady the air traffic controller is now working with n planes in the air. All planes move along a straight coordinate axis with Arkady's station being at point 0 on it. The i-th plane, small en...
instruction
0
31,517
3
63,034
No
output
1
31,517
3
63,035
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arkady the air traffic controller is now working with n planes in the air. All planes move along a straight coordinate axis with Arkady's station being at point 0 on it. The i-th plane, small en...
instruction
0
31,518
3
63,036
No
output
1
31,518
3
63,037
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Arkady the air traffic controller is now working with n planes in the air. All planes move along a straight coordinate axis with Arkady's station being at point 0 on it. The i-th plane, small en...
instruction
0
31,519
3
63,038
No
output
1
31,519
3
63,039
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are 3^N people dancing in circle. We denote with 0,1,\dots, 3^{N}-1 the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in ...
instruction
0
31,565
3
63,130
No
output
1
31,565
3
63,131
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are 3^N people dancing in circle. We denote with 0,1,\dots, 3^{N}-1 the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in ...
instruction
0
31,566
3
63,132
No
output
1
31,566
3
63,133
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are 3^N people dancing in circle. We denote with 0,1,\dots, 3^{N}-1 the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in ...
instruction
0
31,567
3
63,134
No
output
1
31,567
3
63,135
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are 3^N people dancing in circle. We denote with 0,1,\dots, 3^{N}-1 the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in ...
instruction
0
31,568
3
63,136
No
output
1
31,568
3
63,137
Provide a correct Python 3 solution for this coding contest problem. Karakuri Doll Karakuri doll English text is not available in this practice contest. After many years of research, Karakuri puppeteer JAG has succeeded in developing a wonderful tea-drawing doll that combines traditional and latest techniques. This...
instruction
0
31,742
3
63,484
"Correct Solution: ``` from collections import deque import sys readline = sys.stdin.readline write = sys.stdout.write def solve(): W, H = map(int, readline().split()) if W == H == 0: return False S = [readline().strip() for i in range(H)] dd = ((-1, 0), (0, -1), (1, 0), (0, 1)) sx = sy = ...
output
1
31,742
3
63,485
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Daisy is a senior software engineer at RainyDay, LLC. She has just implemented three new features in their product: the first feature makes their product work, the second one makes their product...
instruction
0
31,865
3
63,730
No
output
1
31,865
3
63,731
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Daisy is a senior software engineer at RainyDay, LLC. She has just implemented three new features in their product: the first feature makes their product work, the second one makes their product...
instruction
0
31,866
3
63,732
No
output
1
31,866
3
63,733
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Daisy is a senior software engineer at RainyDay, LLC. She has just implemented three new features in their product: the first feature makes their product work, the second one makes their product...
instruction
0
31,867
3
63,734
No
output
1
31,867
3
63,735
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Suppose you are living with two cats: A and B. There are n napping spots where both cats usually sleep. Your cats like to sleep and also like all these spots, so they change napping spot each h...
instruction
0
31,976
3
63,952
Yes
output
1
31,976
3
63,953