s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1 value | original_language stringclasses 11 values | filename_ext stringclasses 1 value | status stringclasses 1 value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s403182269 | p00021 | u354053070 | 1501982180 | Python | Python3 | py | Runtime Error | 0 | 0 | 245 | from math import isclose
n = int(input())
for _ in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
if isclose((x2 - x1) * (y4 - y3) - (x4 - x3) * (y2 - y1), 0.0):
print("YES")
else:
print("NO") |
s642712403 | p00021 | u236679854 | 1506116538 | Python | Python3 | py | Runtime Error | 0 | 0 | 206 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3):
print("YES")
else:
print("NO") |
s487557836 | p00021 | u236679854 | 1506116586 | Python | Python3 | py | Runtime Error | 0 | 0 | 206 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3):
print("YES")
else:
print("NO") |
s675720287 | p00021 | u236679854 | 1506116704 | Python | Python3 | py | Runtime Error | 0 | 0 | 259 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
if x1 == x2 and x3 == x4:
print("YES")
elif (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3):
print("YES")
else:
print("NO") |
s579653499 | p00021 | u917432951 | 1511339024 | Python | Python3 | py | Runtime Error | 0 | 0 | 591 | import math
if __name__ == '__main__':
n = int(input())
for _ in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
#print((y2-y1)/(x2-x1) - (y4-y3)/(x4-x3))
'''if math.fabs(x1 - x2) <= 0.00001 and math.fabs( x3 - x4) <= 0.00001:
print("YES")
elif math.fabs(x1 - x2) <= 0.00001:
print("NO")
elif math.fabs(x3 - x4) <= 0.00001:
print("NO")
else:
'''
if math.fabs((y2-y1)/(x2-x1) - (y4-y3)/(x4-x3)) <= 0.00001:
print("YES")
else:
print("NO") |
s626107771 | p00021 | u917432951 | 1511339154 | Python | Python3 | py | Runtime Error | 0 | 0 | 593 | import math
if __name__ == '__main__':
n = int(input())
for _ in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
#print((y2-y1)/(x2-x1) - (y4-y3)/(x4-x3))
'''if math.fabs(x1 - x2) <= 0.00001 and math.fabs( x3 - x4) <= 0.00001:
print("YES")
elif math.fabs(x1 - x2) <= 0.00001:
print("NO")
elif math.fabs(x3 - x4) <= 0.00001:
print("NO")
else:
'''
if math.fabs((y2-y1)//(x2-x1) - (y4-y3)//(x4-x3)) <= 0.00001:
print("YES")
else:
print("NO") |
s980597344 | p00021 | u928329738 | 1511742963 | Python | Python3 | py | Runtime Error | 0 | 0 | 270 | def naiseki(x1,y1,z1,x2,y2,z2)
if x1-x2+y1-y2+z1-z2 == 0:
print("YES")
else:
print("NO")
f = input().split()
try:
x1=f[0]
y1=f[1]
z1=f[2]
x2=f[3]
y2=f[4]
z2=[f5]
naiseki(x1,y1,z1,x2,y2,z2)
except:
print("NO")
|
s568770783 | p00021 | u928329738 | 1511743434 | Python | Python3 | py | Runtime Error | 0 | 0 | 396 | def naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
if (x1-x2)*(x3-x4)+(y1-y2)*(y3-y4) == 0:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
f = input().split()
try:
x1=f[0]
y1=f[1]
x2=f[2]
y2=f[3]
x3=f[4]
y3=[f5]
x4=f[6]
y4=f[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO")
|
s472315596 | p00021 | u928329738 | 1511743589 | Python | Python3 | py | Runtime Error | 0 | 0 | 426 | def naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
if (x1-x2)*(x3-x4)+(y1-y2)*(y3-y4) == 0:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
f = input().split()
try:
map(lambda:float(),f)
x1=f[0]
y1=f[1]
x2=f[2]
y2=f[3]
x3=f[4]
y3=[f5]
x4=f[6]
y4=f[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO")
|
s393659288 | p00021 | u928329738 | 1511743770 | Python | Python3 | py | Runtime Error | 0 | 0 | 428 | def naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
if (x1-x2)*(x3-x4)+(y1-y2)*(y3-y4) == 0:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
f = input()
try:
g=map(lambda:float(),f.split())
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=gf5]
x4=g[6]
y4=g[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO")
|
s516822254 | p00021 | u928329738 | 1511774971 | Python | Python3 | py | Runtime Error | 0 | 0 | 451 | import math
def naiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) == 0:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
f = map(float,raw_input().split())
try:
g=f
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO")
|
s478745791 | p00021 | u928329738 | 1511775359 | Python | Python3 | py | Runtime Error | 0 | 0 | 455 | import math
def naiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) == 0:
print("YES")
else:
print("NO")
a = int(input())
f=[]
for i in range(a):
f.append(map(float,raw_input().split()))
for g in f:
try:
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO") |
s714968236 | p00021 | u928329738 | 1511775574 | Python | Python3 | py | Runtime Error | 0 | 0 | 455 | import math
def naiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) == 0:
print("YES")
else:
print("NO")
a = int(input())
f=[]
for i in range(a):
f.append(map(float,raw_input().split()))
for g in f:
try:
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO") |
s630322901 | p00021 | u928329738 | 1511775704 | Python | Python3 | py | Runtime Error | 0 | 0 | 459 | import math
def naiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) == 0:
print("YES")
else:
print("NO")
a = int(raw_input())
f=[]
for i in range(a):
f.append(map(float,raw_input().split()))
for g in f:
try:
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
naiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO") |
s964814890 | p00021 | u928329738 | 1511776287 | Python | Python3 | py | Runtime Error | 0 | 0 | 424 | def gaiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) < 1e-10:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
g=(map(float,raw_input().split()))
try:
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
gaiseki(x1,y1,x2,y2,x3,y3,x4,y4)
except:
print("NO") |
s221741873 | p00021 | u928329738 | 1511776454 | Python | Python3 | py | Runtime Error | 0 | 0 | 363 | a = int(input())
for i in range(0,a):
g=(map(float,raw_input().split()))
try:
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) < 1e-10:
print("YES")
else:
print("NO")
except:
print("NO") |
s166363928 | p00021 | u928329738 | 1511776694 | Python | Python3 | py | Runtime Error | 0 | 0 | 355 | def gaiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) < 1e-10:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
g=(map(float,raw_input().split()))
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
gaiseki(x1,y1,x2,y2,x3,y3,x4,y4) |
s063863721 | p00021 | u928329738 | 1511776748 | Python | Python3 | py | Runtime Error | 0 | 0 | 355 | def gaiseki(x1,y1,x2,y2,x3,y3,x4,y4):
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) < 1e-10:
print("YES")
else:
print("NO")
a = int(input())
for i in range(a):
g=(map(float,raw_input().split()))
x1=g[0]
y1=g[1]
x2=g[2]
y2=g[3]
x3=g[4]
y3=g[5]
x4=g[6]
y4=g[7]
gaiseki(x1,y1,x2,y2,x3,y3,x4,y4) |
s861030992 | p00021 | u928329738 | 1511776914 | Python | Python3 | py | Runtime Error | 0 | 0 | 203 | a = int(input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4=list((map(float,raw_input().split())))
if ((x2-x1)*(y4-y3)-(y2-y1)*(x4-x3)) < 1e-10:
print("YES")
else:
print("NO") |
s934877178 | p00021 | u928329738 | 1511777315 | Python | Python3 | py | Runtime Error | 0 | 0 | 218 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = list(map(float, raw_input().split()))
if abs(((y2-y1)*(x4-x3) - (x2-x1)*(y4-y3))) < 1e-10:
print("YES")
else:
print("NO") |
s133097880 | p00021 | u548155360 | 1512399213 | Python | Python3 | py | Runtime Error | 0 | 0 | 285 | # coding=utf-8
points_list = list(map(float, input().split()))
abx = points_list[2] - points_list[0]
aby = points_list[3] - points_list[1]
cdx = points_list[6] - points_list[4]
cdy = points_list[7] - points_list[5]
if abx == cdx and aby == cdy:
print('YES')
else:
print('NO') |
s945279973 | p00021 | u548155360 | 1512399573 | Python | Python3 | py | Runtime Error | 0 | 0 | 354 | # coding=utf-8
n = int(input())
for i in range(n):
points_list = list(map(float, input().split()))
abx = points_list[2] - points_list[0]
aby = points_list[3] - points_list[1]
cdx = points_list[6] - points_list[4]
cdy = points_list[7] - points_list[5]
if abx / cdx == aby / cdy:
print('YES')
else:
print('NO') |
s109572367 | p00021 | u548155360 | 1512399649 | Python | Python3 | py | Runtime Error | 0 | 0 | 461 | # coding=utf-8
n = int(input())
for i in range(n):
points_list = list(map(float, input().split()))
abx = points_list[2] - points_list[0]
aby = points_list[3] - points_list[1]
cdx = points_list[6] - points_list[4]
cdy = points_list[7] - points_list[5]
if cdx == 0:
if cdy == 0:
print('YES')
else:
print('NO')
elif abx / cdx == aby / cdy:
print('YES')
else:
print('NO') |
s379867405 | p00021 | u568287817 | 1512638535 | Python | Python3 | py | Runtime Error | 0 | 0 | 315 | def calc(a):
i1 = (a[3] - a[1]) / (a[2] - a[0])
i2 = (a[7] - a[5]) / (a[6] - a[4])
if i1 == i2:
print("YES")
else:
print("NO")
if __name__ == '__main__':
N = int(input())
a = []
for i in range(0, N):
a.append(list(map(float, input().split())))
calc(a[i]) |
s706002070 | p00021 | u568287817 | 1512638615 | Python | Python3 | py | Runtime Error | 0 | 0 | 315 | def calc(a):
i1 = (a[3] - a[1]) / (a[2] - a[0])
i2 = (a[7] - a[5]) / (a[6] - a[4])
if i1 == i2:
print("YES")
else:
print("NO")
if __name__ == '__main__':
N = int(input())
a = []
for i in range(0, N):
a.append(list(map(float, input().split())))
calc(a[i]) |
s785997251 | p00021 | u205327055 | 1513222429 | Python | Python | py | Runtime Error | 0 | 0 | 248 | n=input()
for i in range(0,n):
zahyou=map(float,raw_input().split(" "))
a=(zahyou[3]-zahyou[1])/(zahyou[2]-zahyou[0])
b=(zahyou[7]-zahyou[5])/(zahyou[6]-zahyou[4])
if a==b or a==-b:
print "YES"
else:
print "NO", |
s305031978 | p00021 | u205327055 | 1513222836 | Python | Python | py | Runtime Error | 0 | 0 | 284 | n=int(raw_input())
for i in range(0,n):
zahyou=map(float,raw_input().split(" "))
a=(zahyou[3]-zahyou[1])/(zahyou[2]-zahyou[0])
b=(zahyou[7]-zahyou[5])/(zahyou[6]-zahyou[4])
if a==b or a==-b:
print "YES"
else:
print "NO", |
s225884487 | p00021 | u205327055 | 1513223447 | Python | Python | py | Runtime Error | 0 | 0 | 256 | # -*- coding:utf-8 -*-
n=int(raw_input())
for i in range(0,n):
a,b,c,d,e,f,g,h=map(float,raw_input().split(" "))
t=(d-b)/(c-a)
y=(h-f)/(g-e)
if y==t or y==-t:
print "YES"
else:
print "NO", |
s872803514 | p00021 | u205327055 | 1513223504 | Python | Python | py | Runtime Error | 0 | 0 | 224 | # -*- coding:utf-8 -*-
n=int(raw_input())
for i in range(0,n):
a,b,c,d,e,f,g,h=map(float,raw_input().split(" "))
t=(d-b)/(c-a)
y=(h-f)/(g-e)
if y==t or y==-t:
print "YES"
else:
print "NO", |
s387330312 | p00021 | u205327055 | 1513223536 | Python | Python | py | Runtime Error | 0 | 0 | 222 | # -*- coding:utf-8 -*-
n=int(raw_input())
for i in range(n):
a,b,c,d,e,f,g,h=map(float,raw_input().split(" "))
t=(d-b)/(c-a)
y=(h-f)/(g-e)
if y==t or y==-t:
print "YES"
else:
print "NO", |
s252326330 | p00021 | u205327055 | 1513223568 | Python | Python | py | Runtime Error | 0 | 0 | 219 | # -*- coding:utf-8 -*-
n=int(raw_input())
for i in range(n):
a,b,c,d,e,f,g,h=map(float,raw_input().split())
t=(d-b)/(c-a)
y=(h-f)/(g-e)
if y==t or y==-t:
print "YES"
else:
print "NO", |
s756036525 | p00021 | u299798926 | 1513225574 | Python | Python3 | py | Runtime Error | 0 | 0 | 346 | count = int(input())
for i in range(count):
x = list(map(float ,input().split()))
x1=x[2]-x[0]
y1=x[3]-x[1]
x2=x[6]-x[4]
y2=x[7]-x[5]
if x1==0:
if x2==0:
print("YES")
else:
print("NO")
else:
if y1/x1==y2/x2:
print("YES")
else:
print("NO") |
s658283737 | p00021 | u028347703 | 1514694127 | Python | Python3 | py | Runtime Error | 0 | 0 | 268 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
if x2 - x1 == 0:
if x4 - x3 == 0:
print("YES")
else:
print("NO")
print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO") |
s710832089 | p00021 | u028347703 | 1514694196 | Python | Python3 | py | Runtime Error | 0 | 0 | 272 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
if x2 - x1 == 0.0:
if x4 - x3 == 0.0:
print("YES")
else:
print("NO")
print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO") |
s217107841 | p00021 | u028347703 | 1514694309 | Python | Python3 | py | Runtime Error | 0 | 0 | 312 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
if x2 - x1 == 0.0:
if x4 - x3 == 0.0:
print("YES")
else:
print("NO")
elif x4 - x3 == 0.0:
print("NO")
print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO") |
s956143872 | p00021 | u600263347 | 1514773724 | Python | Python3 | py | Runtime Error | 0 | 0 | 270 | def main():
n = int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
if (y2-y1)/(x2-x1) == (y4 - y3)/(x4 -x3):
print("YES")
else:
print("NO")
if __name__ == '__main__':
main()
|
s363587178 | p00021 | u600263347 | 1514773889 | Python | Python3 | py | Runtime Error | 0 | 0 | 270 | def main():
n = int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
if (y2-y1)/(x2-x1) == (y4 - y3)/(x4 -x3):
print("YES")
else:
print("NO")
if __name__ == '__main__':
main()
|
s923288229 | p00021 | u298999032 | 1515138846 | Python | Python3 | py | Runtime Error | 0 | 0 | 223 | n=int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
if ((y1-y2)/(x1-x2))==((y4-y3)/(x4-x3)) or (y1-y2)/(x1-x2)==((y3-y4)/(x3-x4)):
print('YES')
else:
print('NO')
|
s292143968 | p00021 | u298999032 | 1515140021 | Python | Python3 | py | Runtime Error | 0 | 0 | 223 | n=int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
if ((y1-y2)/(x1-x2))==((y4-y3)/(x4-x3)) or (y1-y2)/(x1-x2)==((y3-y4)/(x3-x4)):
print('YES')
else:
print('NO')
|
s943654957 | p00021 | u328199937 | 1519042505 | Python | Python3 | py | Runtime Error | 0 | 0 | 188 | for i in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split(" "))
if (y1 - y2) / (x1 - x2) == (y4 - y3)/ (x4 - x3): print("YES")
else: print("NO")
|
s284434011 | p00021 | u328199937 | 1519042644 | Python | Python3 | py | Runtime Error | 0 | 0 | 194 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split(" "))
if (y1 - y2) / (x1 - x2) == (y4 - y3)/ (x4 - x3): print("YES")
else: print("NO")
|
s153306615 | p00021 | u328199937 | 1519042749 | Python | Python3 | py | Runtime Error | 0 | 0 | 205 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split(" "))
if abs((y1 - y2) / (x1 - x2) - (y4 - y3)/ (x4 - x3)) < 1e-10: print("YES")
else: print("NO")
|
s342994245 | p00021 | u328199937 | 1519042797 | Python | Python3 | py | Runtime Error | 0 | 0 | 202 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
if abs((y1 - y2) / (x1 - x2) - (y4 - y3)/ (x4 - x3)) < 1e-10: print("YES")
else: print("NO")
|
s425875337 | p00021 | u166871988 | 1523769317 | Python | Python3 | py | Runtime Error | 0 | 0 | 184 | n=int(input())
for _ in range(n):
p=[float(i) for i in input().split()]
if round((p[3]-p[1])/(p[2]-p[0]),5)==round((p[7]-p[5])/(p[6]-p[4]),5):print("YES")
else:print("NO")
|
s017759094 | p00021 | u166871988 | 1523769397 | Python | Python3 | py | Runtime Error | 0 | 0 | 202 | n=int(input())
for _ in range(n):
p=[float(i) for i in input().split()]
if round((p[3]-p[1])/(p[2]-p[0]),5)==round((p[7]-p[5])/(p[6]-p[4]),5):
print("YES")
else:
print("NO")
|
s157945931 | p00021 | u166871988 | 1523769536 | Python | Python3 | py | Runtime Error | 0 | 0 | 223 | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
ab=round((p[3]-p[1])/(p[2]-p[0]),5)
cd=round((p[7]-p[5])/(p[6]-p[4]),5)
if ab==cd:
print("YES")
else:
print("NO")
|
s016102868 | p00021 | u166871988 | 1523769671 | Python | Python3 | py | Runtime Error | 0 | 0 | 205 | n=int(input())
for j in range(n):
p=[float(i) for i in input().split()]
ab=(p[3]-p[1])/(p[2]-p[0])
cd=(p[7]-p[5])/(p[6]-p[4])
if ab==cd:
print("YES")
else:
print("NO")
|
s456151412 | p00021 | u136916346 | 1527381702 | Python | Python3 | py | Runtime Error | 0 | 0 | 451 | r=[]
for i in range(int(input())):
d=[float(i) for i in input().split()]
if d[0]-d[2] != 0 and d[4]-d[6] != 0:
a=(d[1]-d[3])/(d[0]-d[2])
b=(d[5]-d[7])/(d[4]-d[6])
if a==b:r.extend([1])
else:r.extend([0])
else if (d[0]==d[2] and d[4]==d[6]):
r.extend([1])
else if (d[1]==d[3] and d[5]==d[7]):
r.extend([1])
else:
r.extend([0])
[print("YES") if i else print("NO") for i in r]
|
s017955530 | p00021 | u894941280 | 1348658645 | Python | Python | py | Runtime Error | 0 | 0 | 176 | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,raw_input().split())
ans,ans2=(y2-y1)/(x2-x1),(y4-y3)/(x4-x3)
if ans==ans2: print "YES"
else: print "NO" |
s966476429 | p00021 | u504990413 | 1353417627 | Python | Python | py | Runtime Error | 0 | 5648 | 231 | num =input()
YN = []
for i in range(num):
x = map(float, raw_input().split(' '))
if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
YN.append('YES')
else:
YN.append('NO')
for i in YN:
print i |
s305247146 | p00021 | u504990413 | 1353417774 | Python | Python | py | Runtime Error | 0 | 5648 | 187 | num =input()
for i in range(num):
x = map(float, raw_input().split(' '))
if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
print 'YES'
else:
print 'NO' |
s980758188 | p00021 | u504990413 | 1353418138 | Python | Python | py | Runtime Error | 0 | 5648 | 345 | num =input()
for i in range(num):
x = map(float, raw_input().split(' '))
if x[1]-x[3] == 0 or x[1]-x[3] == 0:
if x[1]-x[3] == 0 and x[1]-x[3] == 0:
print 'YES'
elif:
print 'NO'
elif (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
print 'YES'
else:
print 'NO' |
s247290506 | p00021 | u504990413 | 1353418187 | Python | Python | py | Runtime Error | 0 | 5648 | 346 | num =input()
for i in range(num):
x = map(float, raw_input().split(' '))
if x[1]-x[3] == 0 or x[5]-x[7] == 0:
if x[1]-x[3] == 0 and x[5]-x[7] == 0:
print 'YES'
elif:
print 'NO'
elif (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
print 'YES'
else:
print 'NO' |
s801819364 | p00021 | u575065019 | 1353665114 | Python | Python | py | Runtime Error | 0 | 1264 | 185 | n = input()
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if ((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)):
print 'YES'
else:
print 'NO' |
s000390522 | p00021 | u575065019 | 1353665228 | Python | Python | py | Runtime Error | 0 | 1264 | 232 | ans = []
n = input()
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if ((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)):
ans.append('YES')
else:
ans.append('NO')
for i in ans:
print i |
s595852901 | p00021 | u575065019 | 1353665393 | Python | Python | py | Runtime Error | 0 | 1264 | 538 | ans = []
n = input()
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if (x2-x1 ==0) or (y2-y1 == 0):
if (x2-x1 ==0) and (y2-y1 == 0):
ans.append('YES')
else:
ans.append('NO')
if (x4-x3 ==0) or (y4-y3 == 0):
if (x4-x3 ==0) and (y4-y3 == 0):
ans.append('YES')
else:
ans.append('NO')
elif ((y2-y1)/(x2-x1) == (y4-y3)/(x4-x3)):
ans.append('YES')
else:
ans.append('NO')
for i in ans:
print i |
s618961984 | p00021 | u894941280 | 1355933885 | Python | Python | py | Runtime Error | 0 | 0 | 182 | a = int(input())
for i in range(a):
ans = map(float,raw_input().split())
if (ans[3]-ans[1])/(ans[2]-ans[0]) == (ans[7]-ans[5])/(ans[6]-ans[4]):
print "YES"
else: print "NO" |
s774463514 | p00021 | u894941280 | 1355990579 | Python | Python | py | Runtime Error | 0 | 0 | 252 | for i in range(int(input())):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split())
if (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3):
ans = (y2-y1)/(x2-x1)
if y1-ans*x1 == y3-ans*x3:
print "NO"
else: print "YES"
else:
print "NO" |
s791443574 | p00021 | u280179677 | 1356078561 | Python | Python | py | Runtime Error | 0 | 0 | 681 | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
raw_input()
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in line.strip().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 == a2*b1:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() |
s817795904 | p00021 | u280179677 | 1356078720 | Python | Python | py | Runtime Error | 0 | 0 | 711 | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
raw_input()
s = sys.stdin.read()
for line in s.splitlines():
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in line.strip().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 == a2*b1:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() |
s696726162 | p00021 | u280179677 | 1356078842 | Python | Python | py | Runtime Error | 0 | 0 | 720 | #!/usr/bin/python
import sys
from collections import namedtuple
from math import sqrt
Point = namedtuple('Point', 'x y')
def datasets():
sys.stdin.readline()
s = sys.stdin.read()
for line in s.splitlines():
x1, y1, x2, y2, x3, y3, x4, y4 = [float(w) for w in line.strip().split()]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
p3 = Point(x3, y3)
p4 = Point(x4, y4)
yield p1, p2, p3, p4
def main():
for A, B, C, D in datasets():
a1 = (B.y - A.y) * -1
b1 = B.x - A.x
a2 = (D.y - C.y) * -1
b2 = D.y - C.y
if a1*b2 == a2*b1:
print "YES"
else:
print "NO"
if __name__ == '__main__':
main() |
s280956239 | p00021 | u419407022 | 1356091149 | Python | Python | py | Runtime Error | 0 | 23000 | 616 | class Point(object):
x = 0.0
y = 0.0
def __init__(self, x, y):
self.x = x
self.y = y
def __sub__(left, right):
return Point(left.x - right.x, left.y - right.y)
#cross
def __mul__(left, right):
return left.x * right.y - left.y * right.x
while True:
try:
(x1, y1, x2, y2, x3, y3, x4, y4) = [int(i) for i in raw_input().split()]
except EOFError:
break
a = Point(x1, y1)
b = Point(x2, y2)
c = Point(x3, y3)
d = Point(x4, y4)
ab = a - b
cd = c - d
if(a * b == 0):
print 'YES'
else:
print 'NO' |
s658805237 | p00021 | u419407022 | 1356091291 | Python | Python | py | Runtime Error | 0 | 23000 | 590 | class Point(object):
x = 0.0
y = 0.0
def __init__(self, x, y):
self.x = x
self.y = y
def __sub__(left, right):
return Point(left.x - right.x, left.y - right.y)
#cross
def __mul__(left, right):
return left.x * right.y - left.y * right.x
for i in range(int(raw_input())):
(x1, y1, x2, y2, x3, y3, x4, y4) = [int(i) for i in raw_input().split()]
a = Point(x1, y1)
b = Point(x2, y2)
c = Point(x3, y3)
d = Point(x4, y4)
ab = a - b
cd = c - d
if(a * b == 0):
print 'YES'
else:
print 'NO' |
s097537365 | p00021 | u419407022 | 1356091430 | Python | Python | py | Runtime Error | 0 | 23000 | 648 | class Point(object):
x = 0.0
y = 0.0
def __init__(self, x, y):
self.x = x
self.y = y
def __sub__(left, right):
return Point(left.x - right.x, left.y - right.y)
#cross
def __mul__(left, right):
return left.x * right.y - left.y * right.x
for i in range(int(raw_input())):
(x1, y1, x2, y2, x3, y3, x4, y4) = [float(i) for i in raw_input().split()]
a = Point(x1, y1)
b = Point(x2, y2)
c = Point(x3, y3)
d = Point(x4, y4)
ab = a - b
cd = c - d
if(a * b == 0.0):
print 'YES'
elif(a * (Point - b) == 0.0):
print 'YES'
else:
print 'NO' |
s946208750 | p00021 | u894941280 | 1356955030 | Python | Python | py | Runtime Error | 0 | 0 | 269 | for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
a1 = (y2-y1)/(x2-x1); a2 = (y4-y3)/(x4-x3)
b1 = y1-(a1*x1) ; b2 = y3-(a2*x3)
if a1 == a2:
if b1 == b2:
print "NO"
else:
print "YES"
else:
print "NO" |
s693731778 | p00021 | u782850731 | 1362103262 | Python | Python | py | Runtime Error | 0 | 0 | 384 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from sys import stdin
def gradient(x1, y1, x2, y2):
return (y1 - y2) / (x1 - x2)
for n in xrange(int(stdin.readline())):
p = [float(s) for s in stdin.readline().split()]
if gradient(*p[:4]) == gradient(*p[4:]):
print('YES')
else:
print('NO') |
s479900738 | p00021 | u894941280 | 1362608257 | Python | Python | py | Runtime Error | 0 | 0 | 217 | for i in range(input()):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
if x1==x2 and x3 ==x4: print "YES"
else:
if (y2-y1)/(x2-x1) ==(y4-y3)/(x4-x3): print "YES"
else: print "NO" |
s928690372 | p00021 | u894941280 | 1362643269 | Python | Python | py | Runtime Error | 0 | 0 | 228 | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split())
if x1 == x2 and x3 == x4: print "YES"
else:
if (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4): print "YES"
else: print "NO" |
s340914048 | p00021 | u282635979 | 1363437339 | Python | Python | py | Runtime Error | 0 | 0 | 167 | n = input() + 1
for val in range(1,n):
x = map(float,raw_input().split(' '))
if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
print 'YES'
else:
print 'NO' |
s986505848 | p00021 | u542421762 | 1368198308 | Python | Python | py | Runtime Error | 0 | 0 | 527 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2:
return x3 == x4
elif y1 == y2:
return y3 == y4
else:
return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s658823060 | p00021 | u542421762 | 1368260740 | Python | Python | py | Runtime Error | 0 | 0 | 527 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2:
return x3 == x4
elif y1 == y2:
return y3 == y4
else:
return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s153698877 | p00021 | u542421762 | 1368278078 | Python | Python | py | Runtime Error | 0 | 0 | 527 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2:
return x3 == x4
elif y1 == y2:
return y3 == y4
else:
return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s038439536 | p00021 | u542421762 | 1368278178 | Python | Python | py | Runtime Error | 0 | 0 | 552 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2 or x3 == x4:
return x1 == x2 and x3 == x4
elif y1 == y2:
return y3 == y4
else:
return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s269586405 | p00021 | u542421762 | 1368278363 | Python | Python | py | Runtime Error | 0 | 0 | 554 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2 or x3 == x4:
return x1 == x2 and x3 == x4
# elif y1 == y2:
# return y3 == y4
else:
return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s316476090 | p00021 | u542421762 | 1368278626 | Python | Python | py | Runtime Error | 0 | 0 | 558 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2 or x3 == x4:
return x1 == x2 and x3 == x4
# elif y1 == y2:
# return y3 == y4
else:
return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s845839400 | p00021 | u542421762 | 1368278926 | Python | Python | py | Runtime Error | 0 | 0 | 581 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 == x2 or x3 == x4:
return x1 == x2 and x3 == x4
elif y1 == y2 or y3 == y4:
return y1 == y2 and y3 == y4
else:
return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))
#input_file = open(sys.argv[1], "r")
#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s778685939 | p00021 | u542421762 | 1368279748 | Python | Python | py | Runtime Error | 0 | 0 | 536 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x1 - x2 == 0.0 or x3 - x4 == 0.0:
return x1 - x2 == 0.0 and x3 - x4 == 0.0
# elif y1 == y2 or y3 == y4:
# return y1 == y2 and y3 == y4
else:
return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s380076980 | p00021 | u542421762 | 1368279825 | Python | Python | py | Runtime Error | 0 | 0 | 466 |
import sys
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
if x2 - x1 == 0.0 or x4 - x3 == 0.0:
return x2 - x1 == 0.0 and x4 - x3 == 0.0
else:
return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))
lines = sys.stdin.readlines()
lines.pop(0)
for line in lines:
x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
print "YES"
else:
print "NO" |
s284733952 | p00021 | u350508326 | 1368464769 | Python | Python | py | Runtime Error | 0 | 0 | 355 | def cal(x1,y1,x2,y2):
t = y1 - y2
v = x1 - x2
return t/v
if __name__ == "__main__":
a = int(raw_input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split(' '))
m1 = cal(x1,y1,x2,y2)
m2 = cal(x3,y3,x4,y4)
if m1 == m2:
print 'YES'
else:
print 'NO' |
s053016517 | p00021 | u350508326 | 1368464813 | Python | Python | py | Runtime Error | 0 | 0 | 355 | def cal(x1,y1,x2,y2):
t = y1 - y2
v = x1 - x2
return t/v
if __name__ == "__main__":
a = int(raw_input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split(' '))
m1 = cal(x1,y1,x2,y2)
m2 = cal(x3,y3,x4,y4)
if m1 == m2:
print 'YES'
else:
print 'NO' |
s869430090 | p00021 | u350508326 | 1368465573 | Python | Python | py | Runtime Error | 0 | 0 | 355 | def cal(x1,y1,x2,y2):
t = y1 - y2
v = x1 - x2
return t/v
if __name__ == "__main__":
a = int(raw_input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split(' '))
m1 = cal(x1,y1,x2,y2)
m2 = cal(x3,y3,x4,y4)
if m1 == m2:
print 'YES'
else:
print 'NO' |
s992548162 | p00021 | u350508326 | 1368465962 | Python | Python | py | Runtime Error | 0 | 0 | 547 | def cal(x1,y1,x2,y2):
t = y1 - y2
v = x1 - x2
return t/v
if __name__ == "__main__":
a = int(raw_input())
for i in range(a):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split(' '))
m1 = cal(x1,y1,x2,y2)
m2 = cal(x3,y3,x4,y4)
if (x1-x2) == 0 or (x3-x4) == 0:
if (x1-x2) == 0 and (x3-x4) == 0:
print 'YES'
else:
print 'NO'
else:
if m1 == m2:
print 'YES'
else:
print 'NO' |
s670443180 | p00021 | u866760195 | 1378310654 | Python | Python | py | Runtime Error | 0 | 0 | 641 | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(int,raw_input().split())
if x2-x1==0 or x4-x3==0:
if x2-x1==0 and x4-x3==0:
print "YES"
else:
print "NO"
elif y2-y1==0 or y4-y3==0:
if y2-y1==0 and y4-y3==0:
print "YES"
else:
print "NO"
else:
a = (y2-y1)/(x2-x1)
b = (y4-y3)/(x4-x3)
if a == b:
print "YES"
else:
print "NO" |
s814776087 | p00021 | u866760195 | 1378311301 | Python | Python | py | Runtime Error | 0 | 0 | 785 | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(int,raw_input().split())
if x2-x1==0 or x4-x3==0:
if x2-x1==0 and x4-x3==0:
print "YES"
else:
print "NO"
elif y2-y1==0 or y4-y3==0:
if y2-y1==0 and y4-y3==0:
print "YES"
else:
print "NO"
else:
a = (y2-y1)/(x2-x1)
b = (y4-y3)/(x4-x3)
if a == b:
print "YES"
else:
print "NO" |
s931202117 | p00021 | u866760195 | 1378311465 | Python | Python | py | Runtime Error | 0 | 0 | 725 | n = input()+1
for v in range(1,n):
(x1,y1,x2,y2,x3,y3,x4,y4)=map(int,raw_input().split())
if x2-x1==0 or x4-x3==0:
if x2-x1==0 and x4-x3==0:
print "YES"
else:
print "NO"
elif y2-y1==0 or y4-y3==0:
if y2-y1==0 and y4-y3==0:
print "YES"
else:
print "NO"
else:
if (y2-y1)/(x2-x1) == (y4-y3)/(x4-x3):
print "YES"
else:
print "NO" |
s910009508 | p00021 | u866760195 | 1378312461 | Python | Python | py | Runtime Error | 0 | 0 | 585 | n = input()+1
for v in range(1,n):
x=map(float,raw_input().split())
if x[2]-x[0]==0 and x[6]-x[4]==0:
print "YES"
elif x[2]-x[0]!=0 and x[6]-x[4]==0:
print "NO"
elif x[2]-x[0]==0 and x[6]-x[4]!=0:
print "NO"
else:
if (y[3]-y[1])/(x[2]-x[0]) == (y[7]-y[5])/(x[6]-x[4]):
print "YES"
else:
print "NO" |
s567900746 | p00021 | u866760195 | 1378345664 | Python | Python | py | Runtime Error | 0 | 0 | 163 | n = int(raw_input())
for i in range(n):
d = [float(x) for x in raw_input().split()]
if (d[2]-d[0])*(d[7]-d[5])==(d[3]-d[1])*(d[6]-d[4]):
else:
"NO" |
s757387542 | p00021 | u813384600 | 1379513192 | Python | Python | py | Runtime Error | 0 | 0 | 205 | n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3):
print 'YES'
else:
print 'NO' |
s454588586 | p00021 | u523886269 | 1381386373 | Python | Python | py | Runtime Error | 0 | 0 | 668 | #!/usr/bin/python
def main():
numData = int(raw_input())
count = 0
while count < numData:
line = raw_input()
coords = map(float, line.strip().split())
result = isParallel(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7])
if result :
print "YES"
else:
print "NO"
count += 1
def isParallel(x1, y1, x2, y2, x3, y3, x4, y4):
x1 = int(x1 * 100000)
y1 = int(y1 * 100000)
x2 = int(x2 * 100000)
y2 = int(y2 * 100000)
x3 = int(x3 * 100000)
y3 = int(y3 * 100000)
x4 = int(x4 * 100000)
y4 = int(y4 * 100000)
if (x2 == x1):
return x4 == x3
else:
return (y2 - y1)/(x2 - x1) == (y4 - y3)/(x4 - x3)
main() |
s950140969 | p00021 | u093607836 | 1382890369 | Python | Python | py | Runtime Error | 0 | 0 | 154 | import sys
for s in sys.stdin:
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,s.split())
a = (y2-y1)/(x2-x1)
b = (y4-y3)/(x4-x3)
print 'YES' if a == b else 'NO' |
s500374569 | p00021 | u093607836 | 1382890448 | Python | Python | py | Runtime Error | 0 | 0 | 167 | for l in xrange(int(raw_input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
a = (y2-y1)/(x2-x1)
b = (y4-y3)/(x4-x3)
print 'YES' if a == b else 'NO' |
s911505356 | p00021 | u093607836 | 1382890625 | Python | Python | py | Runtime Error | 0 | 0 | 167 | for i in xrange(int(raw_input())):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
a = (y2-y1)/(x2-x1)
b = (y4-y3)/(x4-x3)
print 'YES' if a == b else 'NO' |
s965218587 | p00021 | u633068244 | 1393381042 | Python | Python | py | Runtime Error | 0 | 0 | 214 | n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
a = (y2-y1)/(x2-x1)
c = (y4-y3)/(x3-x1)
if a == c:
print "YES"
else:
print "NO" |
s130110241 | p00021 | u633068244 | 1393381239 | Python | Python | py | Runtime Error | 0 | 0 | 213 | n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
a = (y2-y1)/(x2-x1)
c = (y4-y3)/(x4-x3)
if a == c:
print "YES"
else:
print "NO" |
s736972595 | p00021 | u633068244 | 1393381380 | Python | Python | py | Runtime Error | 0 | 0 | 214 | n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
a = (y2-y1)/(x2-x1)
c = (y4-y3)/(x4-x3)
if a == c:
print "YES"
else:
print "NO" |
s500232284 | p00021 | u633068244 | 1393382982 | Python | Python | py | Runtime Error | 0 | 0 | 332 | import math
n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif fabs((y2-y1)*(x4-x3) - (y4-y3)*(x2-x1))<0.000001:
print "YES"
else:
print "NO" |
s117063072 | p00021 | u633068244 | 1393383069 | Python | Python | py | Runtime Error | 0 | 0 | 320 | import math
n = int(raw_input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
if x2-x1==0.0 and x4-x3==0.0:
print "YES"
elif y2-y1==0.0 and y4-y3==0.0:
print "YES"
elif (y2-y1)*(x4-x3)/(y4-y3)/(x2-x1)==1.0:
print "YES"
else:
print "NO" |
s762854729 | p00021 | u912237403 | 1394222861 | Python | Python | py | Runtime Error | 0 | 0 | 149 | import math
N=range(int(raw_input()))
for i in N:
a,w,b,x,c,y,d,z=map(float, raw_input().split())
print ["NO","YES"][(w-x)*(c-d)=(y-z)*(a-b)] |
s846519728 | p00021 | u193025715 | 1395414616 | Python | Python | py | Runtime Error | 0 | 0 | 276 | n = int(raw_input())
ans = []
for i in range(n):
marks = map(float, raw_input().split())
AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
if AB == CD:
ans.append('YES')
else:
ans.append('NO')
for s in ans:
print s |
s363895917 | p00021 | u193025715 | 1395414713 | Python | Python | py | Runtime Error | 0 | 0 | 276 | n = int(raw_input())
ans = []
for i in range(n):
marks = map(float, raw_input().split())
AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
if AB == CD:
ans.append('YES')
else:
ans.append('NO')
for s in ans:
print s |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.