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.
Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.
He's got a square 2n... | instruction | 0 | 73,629 | 23 | 147,258 |
Yes | output | 1 | 73,629 | 23 | 147,259 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.
He's got a square 2n... | instruction | 0 | 73,630 | 23 | 147,260 |
Yes | output | 1 | 73,630 | 23 | 147,261 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.
He's got a square 2n... | instruction | 0 | 73,631 | 23 | 147,262 |
Yes | output | 1 | 73,631 | 23 | 147,263 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.
He's got a square 2n... | instruction | 0 | 73,635 | 23 | 147,270 |
No | output | 1 | 73,635 | 23 | 147,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,861 | 23 | 147,722 |
Tags: brute force, geometry
Correct Solution:
```
def covers(n, a, num, den):
# a[i] = num / den * i + a[0]
# den * (a[i] - a[0]) = num * i
start = a[0]
used = [False] * n
used[0] = True
for i in range(1, n):
if den * (a[i] - a[0]) == num * i:
used[i] = True
first_unus... | output | 1 | 73,861 | 23 | 147,723 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,862 | 23 | 147,724 |
Tags: brute force, geometry
Correct Solution:
```
import sys
n = int(input())
arr = list(map(int, input().split()))
com = [(0,1), (0,2), (1,2)]
for i in com:
# y = ax + b
a = (arr[i[0]] - arr[i[1]]) / (i[0] - i[1])
b1 = arr[i[0]] - a * (i[0] + 1)
b2 = b1
flag = True
for j in range(len(arr)):
... | output | 1 | 73,862 | 23 | 147,725 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,863 | 23 | 147,726 |
Tags: brute force, geometry
Correct Solution:
```
n = int(input())
arr = list(map(int,input().split()))
marr= [(arr[2]-arr[0])/2,arr[2]-arr[1],arr[1]-arr[0]]
for m in marr:
arr1=[]
for x,y in enumerate(arr):
arr1.append(y-m*(x+1))
if len(set(arr1))==2:
print("Yes")
exit()
print("No")
``` | output | 1 | 73,863 | 23 | 147,727 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,864 | 23 | 147,728 |
Tags: brute force, geometry
Correct Solution:
```
n=int(input())
d=list(map(int,input().split()))
a,b,c=d[:3]
if b-a==c-b:
pr=b-a
ncnt=0
for i in range(3,n):
if (d[i]-c)/(i-2)!=pr:
if ncnt:
if (d[i]-pz)/(i-pind)!=pr:
print('No');exit()
else... | output | 1 | 73,864 | 23 | 147,729 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,865 | 23 | 147,730 |
Tags: brute force, geometry
Correct Solution:
```
from typing import List, Tuple
import sys
# Python is not TCO -> >1000 recursive calls forbidden, need to manually set.
sys.setrecursionlimit(10000)
Point = Tuple[int, int]
Line = List[Point]
def slope(a: Point, b: Point) -> float:
return (b[1] - a[1]) / (b[0] -... | output | 1 | 73,865 | 23 | 147,731 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,866 | 23 | 147,732 |
Tags: brute force, geometry
Correct Solution:
```
n = int(input())
yi = list(map(int, input().split()))
steps = yi[1] - yi[0], (yi[2] - yi[0])/2, yi[2] - yi[1]
if any(len(set(l)) == 2 for l in [[y - i * step for i, y in enumerate(yi)] for step in steps]):
print('Yes')
else:
print('No')
``` | output | 1 | 73,866 | 23 | 147,733 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,867 | 23 | 147,734 |
Tags: brute force, geometry
Correct Solution:
```
from decimal import *
getcontext().prec=16
from math import sqrt
n=int(input())
liste=list(map(int,input().split(" ")))
perm=[(0,1,2),(0,2,1),(1,2,0)]
bool=False
for element in perm:
i0,i1,i2=element
count=2
slope=(liste[i1]-liste[i0])/(i1-i0)
rest=[... | output | 1 | 73,867 | 23 | 147,735 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw two parallel and non-overlapping lines, such that... | instruction | 0 | 73,868 | 23 | 147,736 |
Tags: brute force, geometry
Correct Solution:
```
def coef(a, b):
ax, ay = a
bx, by = b
return (by-ay)/(bx-ax)
def coefl(line):
return coef(line[0], line[1])
def fitline(c, line):
if len(line) <= 1:
return True
return coef(line[0], line[1]) == coef(line[0], c)
def same(linea, lineb):
... | output | 1 | 73,868 | 23 | 147,737 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,869 | 23 | 147,738 |
Yes | output | 1 | 73,869 | 23 | 147,739 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,870 | 23 | 147,740 |
Yes | output | 1 | 73,870 | 23 | 147,741 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,871 | 23 | 147,742 |
Yes | output | 1 | 73,871 | 23 | 147,743 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,872 | 23 | 147,744 |
Yes | output | 1 | 73,872 | 23 | 147,745 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,873 | 23 | 147,746 |
No | output | 1 | 73,873 | 23 | 147,747 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,874 | 23 | 147,748 |
No | output | 1 | 73,874 | 23 | 147,749 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,875 | 23 | 147,750 |
No | output | 1 | 73,875 | 23 | 147,751 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Connect the countless points with lines, till we reach the faraway yonder.
There are n points on a coordinate plane, the i-th of which being (i, yi).
Determine whether it's possible to draw tw... | instruction | 0 | 73,876 | 23 | 147,752 |
No | output | 1 | 73,876 | 23 | 147,753 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consider several coinciding straight lines as a singl... | instruction | 0 | 73,877 | 23 | 147,754 |
Tags: dfs and similar, dsu, graphs, trees
Correct Solution:
```
import sys
from math import *
def pro():
return sys.stdin.readline().strip()
def rop():
return map(int, pro().split())
z = int(pro())
qwe = 1000000007
a = [0] * z
x = {}
y = {}
for i in range(z):
s = tuple(rop())
a[i] = s
if s[0] in x:
x[s[0]].ap... | output | 1 | 73,877 | 23 | 147,755 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consider several coinciding straight lines as a singl... | instruction | 0 | 73,878 | 23 | 147,756 |
Tags: dfs and similar, dsu, graphs, trees
Correct Solution:
```
import sys
from math import *
def minp():
return sys.stdin.readline().strip()
def mint():
return int(minp())
def mints():
return map(int, minp().split())
n = mint()
p = [0]*n
x = dict()
y = dict()
for i in range(n):
a = tuple(mints())
p[i] = a
if... | output | 1 | 73,878 | 23 | 147,757 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consider several coinciding straight lines as a singl... | instruction | 0 | 73,879 | 23 | 147,758 |
Tags: dfs and similar, dsu, graphs, trees
Correct Solution:
```
n = int(input())
disjointSet = [-1] * n
def root(x, level=200):
dp = []
while disjointSet[x] >= 0:
dp.append(x)
x = disjointSet[x]
for i in dp:
disjointSet[i] = x
return x
def join(x, y):
r1, r2 = root(x), root(... | output | 1 | 73,879 | 23 | 147,759 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consid... | instruction | 0 | 73,880 | 23 | 147,760 |
No | output | 1 | 73,880 | 23 | 147,761 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consid... | instruction | 0 | 73,881 | 23 | 147,762 |
No | output | 1 | 73,881 | 23 | 147,763 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consid... | instruction | 0 | 73,882 | 23 | 147,764 |
No | output | 1 | 73,882 | 23 | 147,765 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.
You consid... | instruction | 0 | 73,883 | 23 | 147,766 |
No | output | 1 | 73,883 | 23 | 147,767 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,088 | 23 | 148,176 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0021&lang=jp
WA
"""
import sys
from sys import stdin
input = stdin.readline
class Point(object):
epsilon = 1e-10
def __init__(self, x=0.0, y=0.0):
if isinstance(x, tuple):
self.x =... | output | 1 | 74,088 | 23 | 148,177 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,089 | 23 | 148,178 |
"Correct Solution:
```
E = 10 ** -10
while True:
try:
xa, ya, xb, yb, xc, yc, xd, yd = map(float, input().split())
vabx, vaby = xb - xa, yb - ya
vcdx, vcdy = xd - xc, yd - yc
print("YES" if abs(vabx * vcdx + vaby * vcdy) < E else "NO")
except EOFError:
break
``` | output | 1 | 74,089 | 23 | 148,179 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,090 | 23 | 148,180 |
"Correct Solution:
```
def dot(u,v):
return(u[0]*v[0] + u[1]*v[1])
def solve(v):
eps = 1e-10
xa,ya,xb,yb,xc,yc,xd,yd = v
if abs(dot( (xb-xa, yb-ya), (xd-xc, yd-yc)) ) < eps:
return(True)
else:
return(False)
while True:
try:
v = map(float, input().strip().split())
... | output | 1 | 74,090 | 23 | 148,181 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,091 | 23 | 148,182 |
"Correct Solution:
```
while True:
try:
xa, ya, xb, yb, xc, yc, xd, yd = map(float, input().split())
except:
break
ab = (xb - xa, yb - ya)
cd = (xd - xc, yd - yc)
if abs(ab[0] * cd[0] + ab[1] * cd[1]) < 1e-11:
print('YES')
else:
print('NO')
``` | output | 1 | 74,091 | 23 | 148,183 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,092 | 23 | 148,184 |
"Correct Solution:
```
import sys
from decimal import Decimal as D
orth=lambda l:((D(l[2])-D(l[0]))*(D(l[6])-D(l[4]))+(D(l[3])-D(l[1]))*(D(l[7])-D(l[5])))
[print(l) for l in ["YES" if orth(j)==0 else "NO" for j in [l.split() for l in sys.stdin]]]
``` | output | 1 | 74,092 | 23 | 148,185 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,093 | 23 | 148,186 |
"Correct Solution:
```
while True:
try:
xa, ya, xb, yb, xc, yc, xd, yd = map(float, input().split())
except:
break
abx = xb - xa
aby = yb - ya
cdx = xd - xc
cdy = yd - yc
if abs(abx * cdx + aby * cdy) < 10**(-10):
print("YES")
else:
print("NO")
``` | output | 1 | 74,093 | 23 | 148,187 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,094 | 23 | 148,188 |
"Correct Solution:
```
while 1:
try:
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
if y2-y1==0:
if x3==x4:print("YES")
else:print("NO")
elif y4-y3==0:
if x1==x2:print("YES")
else:print("NO")
else:
if abs((x2-x1)/(y2-y1)... | output | 1 | 74,094 | 23 | 148,189 |
Provide a correct Python 3 solution for this coding contest problem.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, and NO if they are not orthog... | instruction | 0 | 74,095 | 23 | 148,190 |
"Correct Solution:
```
# Aizu Problem 0058: Orthogonal
#
import sys, math, os, bisect
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, x4, y4 = [float(_) for _ in line.split()]
scalar_product = (x2 - ... | output | 1 | 74,095 | 23 | 148,191 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,096 | 23 | 148,192 |
Yes | output | 1 | 74,096 | 23 | 148,193 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,097 | 23 | 148,194 |
Yes | output | 1 | 74,097 | 23 | 148,195 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,098 | 23 | 148,196 |
Yes | output | 1 | 74,098 | 23 | 148,197 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,099 | 23 | 148,198 |
Yes | output | 1 | 74,099 | 23 | 148,199 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,100 | 23 | 148,200 |
No | output | 1 | 74,100 | 23 | 148,201 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,101 | 23 | 148,202 |
No | output | 1 | 74,101 | 23 | 148,203 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,102 | 23 | 148,204 |
No | output | 1 | 74,102 | 23 | 148,205 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Read the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ ... | instruction | 0 | 74,103 | 23 | 148,206 |
No | output | 1 | 74,103 | 23 | 148,207 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
You brought a flat, holeless donut with a $ W $ horizontal $ H $ vertical $ H $ rectangle for ACPC.
Place this donut on the $ 2 $ dimension plane coordinate $ (0,0) $ with the center of the donut so that the side of length H and the $ y $ ax... | instruction | 0 | 74,147 | 23 | 148,294 |
"Correct Solution:
```
def inpl(): return list(map(int, input().split()))
W, H, w, h, x, y = inpl()
a = (min(W//2 , x + w//2) + max(-W//2, x-w//2))
b = (min(H//2 , y + h//2) + max(-H//2, y-h//2))
print(b/a)
``` | output | 1 | 74,147 | 23 | 148,295 |
Provide a correct Python 3 solution for this coding contest problem.
Problem
You brought a flat, holeless donut with a $ W $ horizontal $ H $ vertical $ H $ rectangle for ACPC.
Place this donut on the $ 2 $ dimension plane coordinate $ (0,0) $ with the center of the donut so that the side of length H and the $ y $ ax... | instruction | 0 | 74,148 | 23 | 148,296 |
"Correct Solution:
```
W,H,w,h,x,y = map(int, input().split())
if x+w//2 <= W//2 and y+h//2 <= H//2:
print(y/x)
quit()
else:
if x+w//2 > W//2:
x = (x-w//2+W//2)/2
if y+h//2 > H//2:
y = (y-h//2+H//2)/2
print(y/x)
quit()
``` | output | 1 | 74,148 | 23 | 148,297 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sherlock met Moriarty for a final battle of wits. He gave him a regular n sided convex polygon. In addition to it, he gave him certain diagonals to form regions on the polygon. It was guaranteed... | instruction | 0 | 74,671 | 23 | 149,342 |
No | output | 1 | 74,671 | 23 | 149,343 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sherlock met Moriarty for a final battle of wits. He gave him a regular n sided convex polygon. In addition to it, he gave him certain diagonals to form regions on the polygon. It was guaranteed... | instruction | 0 | 74,672 | 23 | 149,344 |
No | output | 1 | 74,672 | 23 | 149,345 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sherlock met Moriarty for a final battle of wits. He gave him a regular n sided convex polygon. In addition to it, he gave him certain diagonals to form regions on the polygon. It was guaranteed... | instruction | 0 | 74,673 | 23 | 149,346 |
No | output | 1 | 74,673 | 23 | 149,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a rectangle in the xy-plane, with its lower left corner at (0, 0) and its upper right corner at (W, H). Each of its sides is parallel to the x-axis or y-axis. Initially, the whole regio... | instruction | 0 | 74,860 | 23 | 149,720 |
No | output | 1 | 74,860 | 23 | 149,721 |
Provide a correct Python 3 solution for this coding contest problem.
Problem B Parallel Lines
Given an even number of distinct planar points, consider coupling all of the points into pairs. All the possible couplings are to be considered as long as all the given points are coupled to one and only one other point.
Wh... | instruction | 0 | 74,892 | 23 | 149,784 |
"Correct Solution:
```
m = int(input())
P = [list(map(int, input().split())) for i in range(m)]
s = set()
for i in range(m):
xi, yi = P[i]
for j in range(i+1, m):
xj, yj = P[j]
u = xj - xi; v = yj - yi
for x, y in s:
if x * v == y * u:
break
else:
... | output | 1 | 74,892 | 23 | 149,785 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.