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.
There is a factory that inputs the data of the side and diagonal lengths to the machine and cuts out the plastic plate. At this factory, we cut out only parallelogram molds, although they vary i... | instruction | 0 | 73,209 | 23 | 146,418 |
No | output | 1 | 73,209 | 23 | 146,419 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a factory that inputs the data of the side and diagonal lengths to the machine and cuts out the plastic plate. At this factory, we cut out only parallelogram molds, although they vary i... | instruction | 0 | 73,210 | 23 | 146,420 |
No | output | 1 | 73,210 | 23 | 146,421 |
Provide a correct Python 3 solution for this coding contest problem.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but I would like to see if the rectangular drawing paper I p... | instruction | 0 | 73,219 | 23 | 146,438 |
"Correct Solution:
```
lst = [set(map(int, input().split())) for _ in range(6)]
rec = []
while lst:
x = lst[0]
count = lst.count(x)
if count % 2 == 1:
print("no")
break
rec.append((count, x))
for _ in range(count):
lst.pop(lst.index(x))
else:
if len(rec) == 1:
if len(rec[0][1]) == 1:
p... | output | 1 | 73,219 | 23 | 146,439 |
Provide a correct Python 3 solution for this coding contest problem.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but I would like to see if the rectangular drawing paper I p... | instruction | 0 | 73,220 | 23 | 146,440 |
"Correct Solution:
```
a = []
for _ in range(6):a.append(sorted(list(map(int, input().split()))))
a.sort(key = lambda x:x[1])
a.sort(key = lambda x:x[0])
print("yes" if a[0] == a[1] and a[2] == a[3] and a[4] == a[5] and a[0][0] == a[2][0] and a[0][1] == a[4][0] and a[2][1] == a[4][1] else "no")
``` | output | 1 | 73,220 | 23 | 146,441 |
Provide a correct Python 3 solution for this coding contest problem.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but I would like to see if the rectangular drawing paper I p... | instruction | 0 | 73,221 | 23 | 146,442 |
"Correct Solution:
```
c=[[0,0]]*6
for i in range(6):
a,b=sorted(map(int,input().split()))
c[i]=[a,b]
c.sort()
for i in range(0,6,2):
if c[i]!=c[i+1]:print('no');break
else:print(['no','yes'][c[0][0]==c[2][0] and c[0][1]==c[4][0] and c[2][1]==c[4][1]])
``` | output | 1 | 73,221 | 23 | 146,443 |
Provide a correct Python 3 solution for this coding contest problem.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but I would like to see if the rectangular drawing paper I p... | instruction | 0 | 73,222 | 23 | 146,444 |
"Correct Solution:
```
A = sorted(sorted(map(int, input().split())) for i in range(6))
if all(a==b for a, b in zip(A[::2], A[1::2])):
p, q, r = A[::2]
if (p[0] in q and p[1] in r and q[q.index(p[0])^1] == r[r.index(p[1])^1]) or (p[0] in r and p[1] in q and r[r.index(p[0])^1] == q[q.index(p[1])^1]):
prin... | output | 1 | 73,222 | 23 | 146,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but ... | instruction | 0 | 73,223 | 23 | 146,446 |
No | output | 1 | 73,223 | 23 | 146,447 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but ... | instruction | 0 | 73,224 | 23 | 146,448 |
No | output | 1 | 73,224 | 23 | 146,449 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but ... | instruction | 0 | 73,225 | 23 | 146,450 |
No | output | 1 | 73,225 | 23 | 146,451 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The educational program (AHK Education) of the Aiz Broadcasting Corporation broadcasts a program called "Play with Tsukuro" for children. Today is the time to make a box with drawing paper, but ... | instruction | 0 | 73,226 | 23 | 146,452 |
No | output | 1 | 73,226 | 23 | 146,453 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,239 | 23 | 146,478 |
"Correct Solution:
```
import sys
for i in sys.stdin:
a,l,x=map(int,i.split())
print((a*(4*l*l-a*a)**.5+2*l*((l+x)**2-l*l)**.5)/4)
``` | output | 1 | 73,239 | 23 | 146,479 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,240 | 23 | 146,480 |
"Correct Solution:
```
import sys
for s in sys.stdin:a,l,x=map(float,s.split());print(a/2*(l*l-a*a/4)**.5+l/2*(2*l*x+x*x)**.5)
``` | output | 1 | 73,240 | 23 | 146,481 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,241 | 23 | 146,482 |
"Correct Solution:
```
import sys
for s in sys.stdin:
a,l,x=map(float,s.split())
print(a/2*(l*l-a*a/4)**.5+l/2*(2*l*x+x*x)**.5)
``` | output | 1 | 73,241 | 23 | 146,483 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,242 | 23 | 146,484 |
"Correct Solution:
```
from math import sqrt
try:
while 1:
a, l, x = map(int, input().split())
print("%.10f" % (l*sqrt(x*(2*l+x))/2 + a*sqrt(4*l**2 - a**2)/4))
except EOFError:
...
``` | output | 1 | 73,242 | 23 | 146,485 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,243 | 23 | 146,486 |
"Correct Solution:
```
import math
while True :
try :
a, l, x = map(int, input().split())
except EOFError :
break
HC = math.sqrt(l**2 - a**2 / 4)
I = math.sqrt(((l+x)/2)**2 - l**2 / 4)
S1 = a * HC / 2
S2 = l * I / 2
print('{:.8f}'.format(S1 + S2*2))
``` | output | 1 | 73,243 | 23 | 146,487 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,244 | 23 | 146,488 |
"Correct Solution:
```
import math
while True:
try:
a,l,x=map(int, input().split())
temp=(l+x)/2
except EOFError:
break
def heron(i,j,k):
d = (i+j+k)/2
return math.sqrt(d*(d-i)*(d-j)*(d-k))
print((str(heron(a,l,l)+heron(l,temp,temp)*2)))
``` | output | 1 | 73,244 | 23 | 146,489 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,245 | 23 | 146,490 |
"Correct Solution:
```
while True:
try:
a, l, x = map(int, input().split())
except EOFError:
break
s1 = (l + l + x) / 2
v1 = (s1 * (l / 2) * (l / 2) * (x / 2)) ** (1 / 2)
s2 = (l + l + a) / 2
v2 = (s2 * (s2 - l) * (s2 - l) * (s2 - a)) ** (1 / 2)
print(v1 * 2 + v2)
``` | output | 1 | 73,245 | 23 | 146,491 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
KND is a student programmer at the University of Aizu. His chest is known to be very sexy.
<image>
For simplicity, the part of the skin that can be seen from the chest is represented by the isosceles triangle ABC in the figure. However, d... | instruction | 0 | 73,246 | 23 | 146,492 |
"Correct Solution:
```
import sys
for line in sys.stdin:
a,l,x=map(float,line.split())
center=1/2*a*(l**2-(a/2)**2)**0.5
side=1/2*l*(((l+x)/2)**2-(l/2)**2)**0.5
print("{0:.10f}".format(center+side*2))
``` | output | 1 | 73,246 | 23 | 146,493 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,287 | 23 | 146,574 |
"Correct Solution:
```
while True:
h,w = map(int, input().split())
if (h == 0 and w == 0):
break
for i in range(h):
if (i % 2 == 0):
print("#."*(w//2) + "#"*(w%2))
elif (i % 2 == 1):
print(".#"*(w//2) + "."*(w%2))
print()
``` | output | 1 | 73,287 | 23 | 146,575 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,288 | 23 | 146,576 |
"Correct Solution:
```
while 1:
h,w=map(int,input().split())
if h==0:break
for i in range(h):print(('#.'*w)[i%2:][:w])
print()
``` | output | 1 | 73,288 | 23 | 146,577 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,289 | 23 | 146,578 |
"Correct Solution:
```
while True:
h,w = map(int,input().split())
if h+w == 0:
break;
for i in range(h):
for j in range(w):
print("." if (i+j)&1 else "#",end='')
print()
print()
``` | output | 1 | 73,289 | 23 | 146,579 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,290 | 23 | 146,580 |
"Correct Solution:
```
kk=0
while kk==0:
h,w=map(int,input().split())
if h==0 and w==0:
break
else:
for i in range(h):
if i%2==0:
s="#"
else:
s="."
for k in range(w-1):
if s[-1]=="#":
s=s+"."
else:
s=s+"#"
print(s)
print("")
``` | output | 1 | 73,290 | 23 | 146,581 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,291 | 23 | 146,582 |
"Correct Solution:
```
import sys
while True:
y,x = map(int,input().split())
if x==y==0:
break
for i in range(y):
for j in range(x):
if (i+j)%2==0:
sys.stdout.write("#")
else:
sys.stdout.write(".")
print()
print()
``` | output | 1 | 73,291 | 23 | 146,583 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,292 | 23 | 146,584 |
"Correct Solution:
```
while True:
h,w=map(int,input().split())
if h==0:break
for i in range(h):
if i%2==0:print("".join(['#' if i%2==0 else '.' for i in range(w)]))
else:print("".join(['.' if i%2==0 else '#' for i in range(w)]))
print()
``` | output | 1 | 73,292 | 23 | 146,585 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,293 | 23 | 146,586 |
"Correct Solution:
```
while True:
h, w = map(int, input().split())
if h == 0 and w == 0:
break
for i in range(1, h+1):
if i % 2 == 0:
print(('.#'*w)[:w])
else:
print(('#.'*w)[:w])
print()
``` | output | 1 | 73,293 | 23 | 146,587 |
Provide a correct Python 3 solution for this coding contest problem.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
.#.#.#.#.
.#.#.#.#.#
Note that the t... | instruction | 0 | 73,294 | 23 | 146,588 |
"Correct Solution:
```
while True:
H,W = map(int, input().split())
if H == 0 and W == 0:
break
for i in range(H):
for j in range(W):
if(i+j)%2 == 0:
print('#',end="")
else:
print('.',end="")
print()
print()
``` | output | 1 | 73,294 | 23 | 146,589 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,295 | 23 | 146,590 |
Yes | output | 1 | 73,295 | 23 | 146,591 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,296 | 23 | 146,592 |
Yes | output | 1 | 73,296 | 23 | 146,593 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,297 | 23 | 146,594 |
Yes | output | 1 | 73,297 | 23 | 146,595 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,298 | 23 | 146,596 |
Yes | output | 1 | 73,298 | 23 | 146,597 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,299 | 23 | 146,598 |
No | output | 1 | 73,299 | 23 | 146,599 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,300 | 23 | 146,600 |
No | output | 1 | 73,300 | 23 | 146,601 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,301 | 23 | 146,602 |
No | output | 1 | 73,301 | 23 | 146,603 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
.#.#.#.#.
.#.#.#.#.#
.#.... | instruction | 0 | 73,302 | 23 | 146,604 |
No | output | 1 | 73,302 | 23 | 146,605 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,490 | 23 | 146,980 |
Tags: brute force, geometry, math
Correct Solution:
```
from sys import stdin, stdout
from itertools import permutations as p
from itertools import combinations as com
def sqr_or_rec(a, b, c, d):
x = ((a[1] - b[1])**2 + (a[0] - b[0]) **2)
y = ((c[1] - b[1])**2 + (c[0] - b[0]) **2)
w = ((c[1] - d[1])**2 + ... | output | 1 | 73,490 | 23 | 146,981 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,491 | 23 | 146,982 |
Tags: brute force, geometry, math
Correct Solution:
```
from itertools import permutations as p
l = [list(map(int, input().split())) + [_] for _ in range(1, 9)]
def dist(a, b):
return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
def rect(a, b, c, d):
return dist(a, b) == dist(c, d) and dist(a, c) == dist(b, d) ... | output | 1 | 73,491 | 23 | 146,983 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,492 | 23 | 146,984 |
Tags: brute force, geometry, math
Correct Solution:
```
from itertools import combinations, permutations
from math import sqrt
EPS = 1e-6
def sd(x, y):
return ((x[0] - y[0])**2 + (x[1] - y[1])**2)
def is_square(points):
for perm in permutations(points):
if sd(perm[0], perm[1]) == sd(perm[1], perm[2]... | output | 1 | 73,492 | 23 | 146,985 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,493 | 23 | 146,986 |
Tags: brute force, geometry, math
Correct Solution:
```
import sys
import math
MAX = 100000000000000000000000
def is_inverse(a, b):
if b == 0:
return a == MAX or a == -MAX
if a == 0:
return b == MAX or b == -MAX
if a == MAX or a == -MAX:
return b == 0 or b == -0
if b == MAX or ... | output | 1 | 73,493 | 23 | 146,987 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,494 | 23 | 146,988 |
Tags: brute force, geometry, math
Correct Solution:
```
# from decimal import *
# getcontext().prec=16
# from math import sqrt
# from scipy.special import binom
# from collections import defaultdict
from math import sin,pi
from copy import deepcopy
def check(a,b,c):
liste=[[a,b,c],[b,c,a],[b,a,c]]
for element ... | output | 1 | 73,494 | 23 | 146,989 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,495 | 23 | 146,990 |
Tags: brute force, geometry, math
Correct Solution:
```
import math
from itertools import permutations
def dist_cube(a, b):
return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
def area(x1, y1, x2, y2, x3, y3):
return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)))
def in_triangle(x1, y1, x2, y2, x3, y3... | output | 1 | 73,495 | 23 | 146,991 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,496 | 23 | 146,992 |
Tags: brute force, geometry, math
Correct Solution:
```
def L(a, b): return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
def fs(a, b, c, d): return L(a, b) == L(b, c) == L(c, d) == L(d, a) == L(a, c) / 2
def fr(a, b, c, d): return L(a, b) == L(c, d) and L(b, c) == L(d, a) and L(a, c) == L(b, d)
def gs(a, b, c, d): return fs... | output | 1 | 73,496 | 23 | 146,993 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so... | instruction | 0 | 73,497 | 23 | 146,994 |
Tags: brute force, geometry, math
Correct Solution:
```
from math import *
def a(x1,y1,x2,y2,x3,y3,x4,y4):
b=sorted([[x1,y1],[x2,y2],[x3,y3],[x4,y4]])
x1,y1=b[0]
x2,y2=b[1]
x3,y3=b[2]
x4,y4=b[3]
a1=sqrt((x1-x2)**2+(y1-y2)**2)
a2=sqrt((x4-x2)**2+(y4-y2)**2)
a3=sqrt((x4-x3)**2+(y4-y3)**2)
... | output | 1 | 73,497 | 23 | 146,995 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,498 | 23 | 146,996 |
Yes | output | 1 | 73,498 | 23 | 146,997 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,499 | 23 | 146,998 |
Yes | output | 1 | 73,499 | 23 | 146,999 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,500 | 23 | 147,000 |
Yes | output | 1 | 73,500 | 23 | 147,001 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,501 | 23 | 147,002 |
Yes | output | 1 | 73,501 | 23 | 147,003 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,502 | 23 | 147,004 |
No | output | 1 | 73,502 | 23 | 147,005 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,503 | 23 | 147,006 |
No | output | 1 | 73,503 | 23 | 147,007 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,504 | 23 | 147,008 |
No | output | 1 | 73,504 | 23 | 147,009 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split... | instruction | 0 | 73,505 | 23 | 147,010 |
No | output | 1 | 73,505 | 23 | 147,011 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.