message stringlengths 2 44.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 276 109k | cluster float64 23 23 | __index_level_0__ int64 552 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,346 | 23 | 66,692 |
Yes | output | 1 | 33,346 | 23 | 66,693 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,347 | 23 | 66,694 |
Yes | output | 1 | 33,347 | 23 | 66,695 |
Evaluate the correctness of the submitted Python 2 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,348 | 23 | 66,696 |
Yes | output | 1 | 33,348 | 23 | 66,697 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,349 | 23 | 66,698 |
No | output | 1 | 33,349 | 23 | 66,699 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,350 | 23 | 66,700 |
No | output | 1 | 33,350 | 23 | 66,701 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,351 | 23 | 66,702 |
No | output | 1 | 33,351 | 23 | 66,703 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3, y_3), such that 0 β€ x_1, x_2, x_3 β€ n, 0 β€ y_1, y_2, y_3 β€ m and the area of the tri... | instruction | 0 | 33,352 | 23 | 66,704 |
No | output | 1 | 33,352 | 23 | 66,705 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,369 | 23 | 66,738 |
Tags: brute force, geometry
Correct Solution:
```
import math
class Solve(object):
def solve(self, T):
for i in range(T):
n = int(input())
gcd = math.gcd(n, 180)
ans = 180 // gcd
if ans - n // gcd <= 1:
ans *= 2
print(ans)
if _... | output | 1 | 33,369 | 23 | 66,739 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,370 | 23 | 66,740 |
Tags: brute force, geometry
Correct Solution:
```
import math
for _ in range(int(input())):
a=int(input())
g=math.gcd(180,a)
k=a//g
n=180//g
if k+1==n:
n*=2
print(n)
``` | output | 1 | 33,370 | 23 | 66,741 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,371 | 23 | 66,742 |
Tags: brute force, geometry
Correct Solution:
```
from math import gcd
n = int(input())
for t in range(n):
ang = int(input())
if ang == 179:
print(360)
elif ang == 178:
print(180)
elif ang == 90:
print(4)
else:
z = gcd(ang, 180)
if 180%(180-ang) == 0:
... | output | 1 | 33,371 | 23 | 66,743 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,372 | 23 | 66,744 |
Tags: brute force, geometry
Correct Solution:
```
for _ in range(int(input())):
n = int(input())
for i in range(3,10001):
deg = 180/i
if n%deg==0 and n<=(i-2)*(deg):
print(i)
break
``` | output | 1 | 33,372 | 23 | 66,745 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,373 | 23 | 66,746 |
Tags: brute force, geometry
Correct Solution:
```
import math
T = int(input())
for _ in range(T):
ang = int(input())
d = math.gcd(180,ang)
n = 180 // d
k = ang // d
if (n == k + 1): n *= 2
print(n)
``` | output | 1 | 33,373 | 23 | 66,747 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,374 | 23 | 66,748 |
Tags: brute force, geometry
Correct Solution:
```
def compute_gcd(a, b):
while b:
a, b = b, a%b
return a
T = int(input())
while T:
x = int(input())
gcd = compute_gcd(180, x)
if 180%gcd > 0:
print(-1)
else:
n = int(180/gcd)
if n * gcd == 180:
y = (x * n) / 180
if y == n-1:
... | output | 1 | 33,374 | 23 | 66,749 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,375 | 23 | 66,750 |
Tags: brute force, geometry
Correct Solution:
```
import sys
prev = {}
def mprint(ang):
if ang in prev:
print(prev[ang])
return
for i in range(3, 361):
for j in range(1, i-1):
if abs((j * 180 / i) - ang) < 1e-6:
print(i)
prev[ang] = i
return
t = int(input())
for i in range(t):
ang = float(input(... | output | 1 | 33,375 | 23 | 66,751 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} = ang or report that there is no such n-gon.
<... | instruction | 0 | 33,376 | 23 | 66,752 |
Tags: brute force, geometry
Correct Solution:
```
def mingon(angle):
if angle == 90:
return 4
elif angle < 90:
for i in range(1,2*angle +1):
if 360 % (2*angle/i) == 0:
return int(360/(2*angle/i))
else:
for i in range(2,2*(180-angle) +1):
if 360... | output | 1 | 33,376 | 23 | 66,753 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,377 | 23 | 66,754 |
Yes | output | 1 | 33,377 | 23 | 66,755 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,378 | 23 | 66,756 |
Yes | output | 1 | 33,378 | 23 | 66,757 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,379 | 23 | 66,758 |
Yes | output | 1 | 33,379 | 23 | 66,759 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,380 | 23 | 66,760 |
Yes | output | 1 | 33,380 | 23 | 66,761 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,381 | 23 | 66,762 |
No | output | 1 | 33,381 | 23 | 66,763 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,382 | 23 | 66,764 |
No | output | 1 | 33,382 | 23 | 66,765 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,383 | 23 | 66,766 |
No | output | 1 | 33,383 | 23 | 66,767 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given an angle ang.
The Jury asks You to find such regular n-gon (regular polygon with n vertices) that it has three vertices a, b and c (they can be non-consecutive) with \angle{abc} ... | instruction | 0 | 33,384 | 23 | 66,768 |
No | output | 1 | 33,384 | 23 | 66,769 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently Vasya learned that, given two points with different x coordinates, you can draw through them exactly one parabola with equation of type y = x^2 + bx + c, where b and c are reals. Let's call such a parabola an U-shaped one.
Vasya dr... | instruction | 0 | 33,401 | 23 | 66,802 |
Tags: geometry
Correct Solution:
```
import sys
def cross(o, a, b):
return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0])
N = int(input())
A = [None]*N
for i in range(N):
x, y = map(int, sys.stdin.readline().split())
A[i] = (x, y-x*x)
A.sort()
upper = []
for p in reversed(A):
while len(u... | output | 1 | 33,401 | 23 | 66,803 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,646 | 23 | 67,292 |
Tags: brute force, implementation
Correct Solution:
```
na, ma = map(int, input().split())
A = [[0] * 50 for i in range(50)]
for i in range(50 - na, 50):
t = int(input(), 2)
for j in range(50):
A[i][49 - j] = t
t //= 2
nb, mb = map(int, input().split())
B = [[0] * 50 for i in range(50)]
for i... | output | 1 | 33,646 | 23 | 67,293 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,647 | 23 | 67,294 |
Tags: brute force, implementation
Correct Solution:
```
n,m=map(int,input().split())
ar=[]
for i in range(n):
ar.append(list(map(int,list(input()))))
a,b=map(int,input().split())
arr=[]
for j in range(a):
arr.append(list(map(int,list(input()))))
def check(x,y):
res=0
for i in range(n):
for j i... | output | 1 | 33,647 | 23 | 67,295 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,648 | 23 | 67,296 |
Tags: brute force, implementation
Correct Solution:
```
na, ma = map(int, input().split())
ta = [int(input(), 2) for i in range(na)]
nb, mb = map(int, input().split())
tb = [input() for i in range(nb)]
sz1, sz2 = ma - 1, na - 1
x, y = '0' * sz1, '0' * (2 * sz1 + mb)
t = [y] * sz2 + [x + tb[i] + x for i in ran... | output | 1 | 33,648 | 23 | 67,297 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,649 | 23 | 67,298 |
Tags: brute force, implementation
Correct Solution:
```
def mi():
return map(int, input().split())
def mi1():
return map(int, list(input()))
'''
3 2
01
10
00
2 3
001
111
'''
na, ma = mi()
a = [0]*na
for i in range(na):
a[i] = list(mi1())
nb, mb = mi()
b = [0]*nb
for i in range(nb):
b[i] ... | output | 1 | 33,649 | 23 | 67,299 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,650 | 23 | 67,300 |
Tags: brute force, implementation
Correct Solution:
```
na,ma=[int(x) for x in input().split()]
a=[]
for i in range(na):
a.append([int(x) for x in list(input())])
nb,mb=[int(x) for x in input().split()]
b=[]
for i in range(nb):
b.append([int(x) for x in list(input())])
def cal(x,y):
ans=0
for i in ran... | output | 1 | 33,650 | 23 | 67,301 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,651 | 23 | 67,302 |
Tags: brute force, implementation
Correct Solution:
```
na,ma=map(int,input().split())
tab_a=list();tab_b=list();minx=0;mx=0;my=0;
for i in range(na):
tab_a.append([int(i) for i in list(input())])
nb,mb=map(int,input().split())
for i in range(nb):
tab_b.append([int(i) for i in list(input())])
for x in range(-50... | output | 1 | 33,651 | 23 | 67,303 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,652 | 23 | 67,304 |
Tags: brute force, implementation
Correct Solution:
```
n1,m1=map(int,input().split())
a=[]
for i in range(n1):
a.append([int(i) for i in input()])
n2,m2=map(int,input().split())
b=[]
for i in range(n2):
b.append([int(i) for i in input()])
ans1=0
ans2=0
maxi=-1000000000000
for x in range(-50,51):
for y i... | output | 1 | 33,652 | 23 | 67,305 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then we will define the element of the first table, ... | instruction | 0 | 33,653 | 23 | 67,306 |
Tags: brute force, implementation
Correct Solution:
```
na, ma = map(int, input().split())
A = [[0] * 50 for i in range(50)]
for i in range(50 - na, 50):
t = int(input(), 2)
for j in range(50):
A[i][49 - j] = t
t //= 2
nb, mb = map(int, input().split())
B = [[0] * 50 for i in range(50... | output | 1 | 33,653 | 23 | 67,307 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,654 | 23 | 67,308 |
Yes | output | 1 | 33,654 | 23 | 67,309 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,655 | 23 | 67,310 |
Yes | output | 1 | 33,655 | 23 | 67,311 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,656 | 23 | 67,312 |
Yes | output | 1 | 33,656 | 23 | 67,313 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,657 | 23 | 67,314 |
Yes | output | 1 | 33,657 | 23 | 67,315 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,658 | 23 | 67,316 |
No | output | 1 | 33,658 | 23 | 67,317 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,659 | 23 | 67,318 |
No | output | 1 | 33,659 | 23 | 67,319 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,660 | 23 | 67,320 |
No | output | 1 | 33,660 | 23 | 67,321 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You've got two rectangular tables with sizes na Γ ma and nb Γ mb cells. The tables consist of zeroes and ones. We will consider the rows and columns of both tables indexed starting from 1. Then ... | instruction | 0 | 33,661 | 23 | 67,322 |
No | output | 1 | 33,661 | 23 | 67,323 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,752 | 23 | 67,504 |
Tags: brute force, geometry
Correct Solution:
```
import itertools
from itertools import permutations as perm
l = [[int(x) for x in input().split()] for i in range(8)]
def dist2(p0,p1):
return sum([(p0[i]-p1[i])**2 for i in range(3)])
def check(c):
dists = [[(c[i][0]-c[j][0])**2+(c[i][1]-c[j][1])**2+(c[i][2]... | output | 1 | 33,752 | 23 | 67,505 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,753 | 23 | 67,506 |
Tags: brute force, geometry
Correct Solution:
```
from itertools import permutations as p
d = lambda a, b: sum((i - j) ** 2 for i, j in zip(a, b))
f = lambda a, b: [i + j - k for i, j, k in zip(a, b, q)]
g = lambda t: sorted(sorted(q) for q in t)
v = [sorted(map(int, input().split())) for i in range(8)]
q = v.pop()
... | output | 1 | 33,753 | 23 | 67,507 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,754 | 23 | 67,508 |
Tags: brute force, geometry
Correct Solution:
```
from itertools import permutations as p
d = lambda a, b: sum((i - j) ** 2 for i, j in zip(a, b))
f = lambda a, b: [i + j - k for i, j, k in zip(a, b, q)]
g = lambda t: sorted(sorted(q) for q in t)
v = [sorted(map(int, input().split())) for i in range(8)]
q = v.pop()
... | output | 1 | 33,754 | 23 | 67,509 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,755 | 23 | 67,510 |
Tags: brute force, geometry
Correct Solution:
```
import itertools
from itertools import permutations as perm
import copy
def getPerm(it, index):
if index == 0:
return it
elif index == 1:
return [it[0], it[2], it[1]]
elif index == 2:
return [it[1], it[0], it[2]]
elif index == 3:
return [it[1], it[2], it[0]... | output | 1 | 33,755 | 23 | 67,511 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,756 | 23 | 67,512 |
Tags: brute force, geometry
Correct Solution:
```
import itertools
from itertools import permutations as perm
l = [[int(x) for x in input().split()] for i in range(8)]
def dist2(p0,p1):
return sum([(p0[i]-p1[i])**2 for i in range(3)])
def sub(p0,p1):
return [p0[i]-p1[i] for i in range(3)]
def add(p0,p1):
... | output | 1 | 33,756 | 23 | 67,513 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,757 | 23 | 67,514 |
Tags: brute force, geometry
Correct Solution:
```
import itertools
from itertools import permutations as perm
l = [[int(x) for x in input().split()] for i in range(8)]
def dist2(p0,p1):
return sum([(p0[i]-p1[i])**2 for i in range(3)])
def sub(p0,p1):
return [p0[i]-p1[i] for i in range(3)]
def add(p0,p1):
... | output | 1 | 33,757 | 23 | 67,515 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,758 | 23 | 67,516 |
Tags: brute force, geometry
Correct Solution:
```
from itertools import permutations as p
def razn(a, b):
return (a[0] - b[0], a[1] - b[1], a[2] - b[2])
def sp(a, b):
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]
def su(a, b):
return (a[0] + b[0], a[1] + b[1], a[2] + b[2])
a = list(tuple(map(int, in... | output | 1 | 33,758 | 23 | 67,517 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not parallel to the coordinate axes). Then he took ... | instruction | 0 | 33,759 | 23 | 67,518 |
Tags: brute force, geometry
Correct Solution:
```
from itertools import permutations as p
d = lambda a, b: sum((i - j) ** 2 for i, j in zip(a, b))
f = lambda a, b: [i + j - k for i, j, k in zip(a, b, q)]
g = lambda t: sorted(sorted(q) for q in t)
v = [sorted(map(int, input().split())) for i in range(8)]
q = v.... | output | 1 | 33,759 | 23 | 67,519 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not ... | instruction | 0 | 33,760 | 23 | 67,520 |
Yes | output | 1 | 33,760 | 23 | 67,521 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay at integer points (it is possible that the cube's sides are not ... | instruction | 0 | 33,761 | 23 | 67,522 |
No | output | 1 | 33,761 | 23 | 67,523 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.