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. You've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with coordinates (xi, yi). We know that no two bomb...
instruction
0
61,767
3
123,534
Yes
output
1
61,767
3
123,535
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with coordinates (xi, yi). We know that no two bomb...
instruction
0
61,768
3
123,536
No
output
1
61,768
3
123,537
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with coordinates (xi, yi). We know that no two bomb...
instruction
0
61,769
3
123,538
No
output
1
61,769
3
123,539
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with coordinates (xi, yi). We know that no two bomb...
instruction
0
61,770
3
123,540
No
output
1
61,770
3
123,541
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with coordinates (xi, yi). We know that no two bomb...
instruction
0
61,771
3
123,542
No
output
1
61,771
3
123,543
Provide tags and a correct Python 3 solution for this coding contest problem. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not enchanted at all. It is simply a programmed device. ...
instruction
0
61,920
3
123,840
Tags: binary search, geometry Correct Solution: ``` import math import functools import sys def eulen(x, y): r = functools.reduce(lambda x, y: x + y, \ map(lambda x: (x[0] - x[1]) ** 2, zip(x, y))) return math.sqrt(r) def output(t, p): print('YES') print(t) print(' '.join(map(str, p)))...
output
1
61,920
3
123,841
Provide tags and a correct Python 3 solution for this coding contest problem. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not enchanted at all. It is simply a programmed device. ...
instruction
0
61,921
3
123,842
Tags: binary search, geometry Correct Solution: ``` n = int(input()) snitch = [ tuple(map(int, input().split())) for i in range(n + 1) ] v_potter, v_snitch = map(int, input().split()) potter = tuple(map(int, input().split())) xp, yp, zp = potter t_snitch_before = 0 for i in range(1, n + 1): #print(i, t_snitch_bef...
output
1
61,921
3
123,843
Provide tags and a correct Python 3 solution for this coding contest problem. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not enchanted at all. It is simply a programmed device. ...
instruction
0
61,922
3
123,844
Tags: binary search, geometry Correct Solution: ``` n = int(input()) snitch = [ tuple(map(int, input().split())) for i in range(n + 1) ] v_potter, v_snitch = map(int, input().split()) potter = tuple(map(int, input().split())) xp, yp, zp = potter t_snitch_before = 0 for i in range(1, n + 1): #print(i, t_snitch_bef...
output
1
61,922
3
123,845
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not encha...
instruction
0
61,923
3
123,846
No
output
1
61,923
3
123,847
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not encha...
instruction
0
61,924
3
123,848
No
output
1
61,924
3
123,849
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not encha...
instruction
0
61,925
3
123,850
No
output
1
61,925
3
123,851
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not encha...
instruction
0
61,926
3
123,852
No
output
1
61,926
3
123,853
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,189
3
124,378
"Correct Solution: ``` class Graph(): from collections import namedtuple __Pair = namedtuple("Pair", "cost point") def __init__(self, element_count): self.__element_count = element_count self.__adjacency_iist = [[] for _ in range(element_count)] def get_path(self, begin_Point, end_poin...
output
1
62,189
3
124,379
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,190
3
124,380
"Correct Solution: ``` """ def find(s,p,g,box,cost): for i in rooter[p]: if i==g:box.append(cost+1) elif i==s:continue else:find(s,i,g,box,cost+1) return box rooter={} for i in range(int(input())): N=list(map(int,input().split())) box=[] for j in N[2:]:box.append(j) roote...
output
1
62,190
3
124,381
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,191
3
124,382
"Correct Solution: ``` # -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0144 """ import sys from sys import stdin input = stdin.readline from enum import Enum class Graph(object): """ single source shortest path """ class Status(Enum): """ ?????????????¨??????¶??? ...
output
1
62,191
3
124,383
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,192
3
124,384
"Correct Solution: ``` # -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0144 """ import sys from sys import stdin input = stdin.readline from enum import Enum class Graph(object): """ single source shortest path """ class Status(Enum): """ ?????????????¨??????¶??? ...
output
1
62,192
3
124,385
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,193
3
124,386
"Correct Solution: ``` from functools import lru_cache n=int(input()) router={} for _ in range(n): t=[int(i) for i in input().split(" ")] r=t[0] k=t[1] t=t[2::] router[r]=t def transport(s,g): distance=[10**10 for i in range(n+1)] distance[s]=0 next=[s] for i in range(1,n+1): ...
output
1
62,193
3
124,387
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,194
3
124,388
"Correct Solution: ``` # -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0144 """ import sys from sys import stdin input = stdin.readline from enum import Enum class Graph(object): """ single source shortest path """ class Status(Enum): """ ?????????????¨??????¶??? ...
output
1
62,194
3
124,389
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,195
3
124,390
"Correct Solution: ``` # AOJ 0144 Packet Transportation # Python3 2018.6.23 bal4u INF = 0x7fffffff n = int(input()) arr = [[INF for j in range(n)] for i in range(n)] for i in range(n): a = list(map(int, input().split())) x, k = a[0]-1, a[1] for j in range(k): y = a[j+2]-1 arr[x][y] = 1 for k in range(n): arr[k...
output
1
62,195
3
124,391
Provide a correct Python 3 solution for this coding contest problem. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the destination described in the packet. In addition, a value ca...
instruction
0
62,196
3
124,392
"Correct Solution: ``` from collections import deque n = int(input()) rlst = [None] * (n + 1) for _ in range(n): lst = list(map(int, input().split())) r = lst[0] lst = lst[2:] rlst[r] = lst p = int(input()) for _ in range(p): s, d, v = map(int, input().split()) visited = [False] * (n + 1) visited[s] = ...
output
1
62,196
3
124,393
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the dest...
instruction
0
62,197
3
124,394
No
output
1
62,197
3
124,395
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the dest...
instruction
0
62,198
3
124,396
No
output
1
62,198
3
124,397
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the dest...
instruction
0
62,199
3
124,398
No
output
1
62,199
3
124,399
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. On the Internet, data is divided into packets, and each packet is transferred to a destination via a relay device called a router. Each router determines the next router to forward from the dest...
instruction
0
62,200
3
124,400
No
output
1
62,200
3
124,401
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,578
3
125,156
Tags: brute force, implementation Correct Solution: ``` """ ____ _ _____ / ___|___ __| | ___| ___|__ _ __ ___ ___ ___ | | / _ \ / _` |/ _ \ |_ / _ \| '__/ __/ _ \/ __| | |__| (_) | (_| | __/ _| (_) | | | (_| __/\__ \ \____\___/ \__,_|\___|_| \___/|_| \___\___||___/ """ """ ░░██▄░░░░░░░░░░...
output
1
62,578
3
125,157
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,579
3
125,158
Tags: brute force, implementation Correct Solution: ``` import math n = int(input()) l = list(map(int,input().split())) m = int(input()) l1 = list(map(int,input().split())) dict = {} for i in l: for j in l1: if math.floor(j/i) == (j/i): if (j//i) in dict: dict[j//i]+=1 ...
output
1
62,579
3
125,159
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,580
3
125,160
Tags: brute force, implementation Correct Solution: ``` n = int(input()) a = [int(x) for x in input().split()] m = int(input()) b = [int(x) for x in input().split()] ans = [] for i in range(n): for j in range(m): if b[j] % a[i] == 0: # print(b[j], a[i]) ans.append(b[j] / a[i]) prin...
output
1
62,580
3
125,161
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,581
3
125,162
Tags: brute force, implementation Correct Solution: ``` import math n = int(input()) a = list(map(int,input().split())) m = int(input()) b = list(reversed(list(map(int,input().split())))) count = 0 ma = -math.inf for ai in a: for bi in b: if bi%ai == 0: pm = bi//ai if pm>ma: ...
output
1
62,581
3
125,163
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,582
3
125,164
Tags: brute force, implementation Correct Solution: ``` m = int(input()) a = list(map(int, input().split())) n = int(input()) b = list(map(int, input().split())) maxM = 0 for i in range(m): for j in range(n): if b[j]//a[i] == b[j]/a[i] and b[j]//a[i] > maxM: maxM = b[j]//a[i] count = 0 for i in range(m): for j ...
output
1
62,582
3
125,165
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,583
3
125,166
Tags: brute force, implementation Correct Solution: ``` n = int(input()) nums = input().split() a = [] for i in range(n): a.append(int(nums[i])) m = int(input()) nums = input().split() b = [] for i in range(m): b.append(int(nums[i])) maxratio = 0 maxct = 0 for i in a: for j in b: if j%i != 0: ...
output
1
62,583
3
125,167
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,584
3
125,168
Tags: brute force, implementation Correct Solution: ``` n = int(input()) a = list(map(int,input().split())) m = int(input()) b = list(map(int,input().split())) c = [] for i in range(m): for j in range(n): if b[i]%a[j]==0: c.append(b[i]//a[j]) print(c.count(max(c))) ```
output
1
62,584
3
125,169
Provide tags and a correct Python 3 solution for this coding contest problem. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th star ...
instruction
0
62,585
3
125,170
Tags: brute force, implementation Correct Solution: ``` import sys,os,io,time,copy if os.path.exists('input.txt'): sys.stdin = open('input.txt', 'r') sys.stdout = open('output.txt', 'w') import math def main(): # start=time.time() n=int(input()) arr=list(map(int,input().split())) m=int(input()...
output
1
62,585
3
125,171
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,586
3
125,172
Yes
output
1
62,586
3
125,173
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,587
3
125,174
Yes
output
1
62,587
3
125,175
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,588
3
125,176
Yes
output
1
62,588
3
125,177
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,589
3
125,178
Yes
output
1
62,589
3
125,179
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,590
3
125,180
No
output
1
62,590
3
125,181
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,591
3
125,182
No
output
1
62,591
3
125,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,592
3
125,184
No
output
1
62,592
3
125,185
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Vasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting t...
instruction
0
62,593
3
125,186
No
output
1
62,593
3
125,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A super computer has been built in the Turtle Academy of Sciences. The computer consists of n·m·k CPUs. The architecture was the paralellepiped of size n × m × k, split into 1 × 1 × 1 cells, eac...
instruction
0
62,757
3
125,514
No
output
1
62,757
3
125,515
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A super computer has been built in the Turtle Academy of Sciences. The computer consists of n·m·k CPUs. The architecture was the paralellepiped of size n × m × k, split into 1 × 1 × 1 cells, eac...
instruction
0
62,758
3
125,516
No
output
1
62,758
3
125,517
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A super computer has been built in the Turtle Academy of Sciences. The computer consists of n·m·k CPUs. The architecture was the paralellepiped of size n × m × k, split into 1 × 1 × 1 cells, eac...
instruction
0
62,759
3
125,518
No
output
1
62,759
3
125,519
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. A super computer has been built in the Turtle Academy of Sciences. The computer consists of n·m·k CPUs. The architecture was the paralellepiped of size n × m × k, split into 1 × 1 × 1 cells, eac...
instruction
0
62,760
3
125,520
No
output
1
62,760
3
125,521
Provide tags and a correct Python 3 solution for this coding contest problem. You need to execute several tasks, each associated with number of processors it needs, and the compute power it will consume. You have sufficient number of analog computers, each with enough processors for any task. Each computer can execut...
instruction
0
62,883
3
125,766
Tags: binary search, dp, greedy Correct Solution: ``` # Codeforces Round #488 by NEAR (Div. 2) import collections from functools import cmp_to_key #key=cmp_to_key(lambda x,y: 1 if x not in y else -1 ) import math import sys def getIntList(): return list(map(int, input().split())) import bisect def makePa...
output
1
62,883
3
125,767
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You need to execute several tasks, each associated with number of processors it needs, and the compute power it will consume. You have sufficient number of analog computers, each with enough pr...
instruction
0
62,884
3
125,768
No
output
1
62,884
3
125,769
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. You need to execute several tasks, each associated with number of processors it needs, and the compute power it will consume. You have sufficient number of analog computers, each with enough pr...
instruction
0
62,885
3
125,770
No
output
1
62,885
3
125,771
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Tsuruga Castle, a symbol of Aizuwakamatsu City, was named "Tsuruga Castle" after Gamo Ujisato built a full-scale castle tower. You can overlook the Aizu basin from the castle tower. On a clear d...
instruction
0
63,041
3
126,082
Yes
output
1
63,041
3
126,083
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Tsuruga Castle, a symbol of Aizuwakamatsu City, was named "Tsuruga Castle" after Gamo Ujisato built a full-scale castle tower. You can overlook the Aizu basin from the castle tower. On a clear d...
instruction
0
63,042
3
126,084
Yes
output
1
63,042
3
126,085
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Tsuruga Castle, a symbol of Aizuwakamatsu City, was named "Tsuruga Castle" after Gamo Ujisato built a full-scale castle tower. You can overlook the Aizu basin from the castle tower. On a clear d...
instruction
0
63,043
3
126,086
Yes
output
1
63,043
3
126,087