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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s251552355 | p00021 | u879226672 | 1424366175 | Python | Python | py | Runtime Error | 0 | 0 | 236 | n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab == cd:
print 'YES'
else:
print 'NO' |
s225421207 | p00021 | u879226672 | 1424366204 | Python | Python | py | Runtime Error | 0 | 0 | 242 | n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab == cd:
print 'YES'
else:
print 'NO'
break |
s204541300 | p00021 | u879226672 | 1424366245 | Python | Python | py | Runtime Error | 0 | 0 | 284 | while True:
n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab == cd:
print 'YES'
else:
print 'NO' |
s066239038 | p00021 | u879226672 | 1424366283 | Python | Python | py | Runtime Error | 0 | 0 | 364 | while True:
try:
n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab == cd:
print 'YES'
else:
print 'NO'
except EOFError:
break |
s003988237 | p00021 | u879226672 | 1424366332 | Python | Python | py | Runtime Error | 0 | 0 | 376 | import math
while True:
try:
n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab == cd:
print 'YES'
else:
print 'NO'
except EOFError:
break |
s515820660 | p00021 | u879226672 | 1424366695 | Python | Python | py | Runtime Error | 0 | 0 | 369 | while True:
try:
n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab - cd<1e-10:
print 'YES'
else:
print 'NO'
except EOFError:
break |
s406426842 | p00021 | u879226672 | 1424367336 | Python | Python | py | Runtime Error | 0 | 0 | 556 | while True:
try:
n = int(raw_input())
for k in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float,raw_input().split(' '))
if x2-x1<1e-10 and x4-x3<1e-10:
print 'YES'
elif x2-x1<1e-10 and x4-x3<1e-10:
print 'NO'
else:
ab = abs((y2-y1)/(x2-x1))
cd = abs((y4-y3)/(x4-x3))
if ab - cd<1e-10:
print 'YES'
else:
print 'NO'
except EOFError:
break |
s414473869 | p00021 | u744114948 | 1425906455 | Python | Python3 | py | Runtime Error | 0 | 0 | 163 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
if (b-d)/(a-c) == (f-h)/(e-g):
print("Yes")
else:
print("No") |
s078046566 | p00021 | u744114948 | 1425906549 | Python | Python3 | py | Runtime Error | 0 | 0 | 163 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
if (b-d)/(a-c) == (f-h)/(e-g):
print("Yes")
else:
print("No") |
s786892004 | p00021 | u744114948 | 1425906587 | Python | Python3 | py | Runtime Error | 0 | 0 | 167 | n=int(input())
for _ in range(n):
a,b,c,d,e,f,g,h=map(float, input().split())
if (b-d)/(a-c) == (f-h)/(e-g):
print("Yes")
else:
print("No") |
s686491989 | p00021 | u744114948 | 1425906662 | Python | Python3 | py | Runtime Error | 0 | 0 | 163 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
if (b-d)/(a-c) == (f-h)/(e-g):
print("Yes")
else:
print("No") |
s916787093 | p00021 | u744114948 | 1425906892 | Python | Python3 | py | Runtime Error | 0 | 0 | 167 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
if ((b-d)/(a-c)) == ((f-h)/(e-g)):
print("Yes")
else:
print("No") |
s518776208 | p00021 | u744114948 | 1425907468 | Python | Python3 | py | Runtime Error | 0 | 0 | 278 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
try:
i = (b-d)/(a-c)
except:
i = 90
try:
j = (f-h)/(e-g)
except:
j = 90
if i == j:
print("Yes")
else:
print("No")
input() |
s915487973 | p00021 | u744114948 | 1425908596 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | for _ in range(int(input())):
a,b,c,d,e,f,g,h=map(float, input().split())
if abs((c-a)*(h-f) - (d-b)*(g-e)) < 1e-10:
print("No")
else:
print("Yes")
input() |
s834937108 | p00021 | u621997536 | 1429239316 | Python | Python3 | py | Runtime Error | 0 | 0 | 252 | n = int(input())
for i in range(n):
p = list(map(float, input().split()))
if p[2] == p[1]:
print("YES" if p[4] == p[6] else "NO")
else:
print("YES" if (p[3] - p[1]) / (p[2] - p[0]) == (p[7] - p[5]) / (p[6] - p[4]) else "NO") |
s444410142 | p00021 | u162387221 | 1431252628 | Python | Python | py | Runtime Error | 0 | 0 | 185 | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4):
print 'YES'
else:
print 'NO' |
s702106396 | p00021 | u162387221 | 1431252775 | Python | Python | py | Runtime Error | 0 | 0 | 185 | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4):
print 'YES'
else:
print 'NO' |
s069520845 | p00021 | u873482706 | 1434525177 | Python | Python | py | Runtime Error | 0 | 0 | 252 | n = int(raw_input())
for i in range(n):
x_a, y_a, x_b, y_b, x_c, y_c, x_d, y_d = map(float, raw_input().split())
AB = (y_b - y_a) / (x_b - x_a)
CD = (y_d - y_c) / (x_d - x_c)
if AB == CD:
print 'YES'
else:
print 'NO' |
s072525408 | p00021 | u379956761 | 1434882778 | Python | Python3 | py | Runtime Error | 0 | 0 | 242 | import sys
n = int(input())
for s in sys.stdin:
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, s.strip().split())
angle1 = (y2-y1)/(x2-x1)
angle2 = (y4-y3)/(x4-x3)
if angle1 == angle2:
print("YES")
else:
print("NO") |
s789052136 | p00021 | u379956761 | 1434882881 | Python | Python3 | py | Runtime Error | 0 | 0 | 247 | import sys
n = int(input())
for s in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, input().strip().split())
angle1 = (y2-y1)/(x2-x1)
angle2 = (y4-y3)/(x4-x3)
if angle1 == angle2:
print("YES")
else:
print("NO") |
s494218199 | p00021 | u379956761 | 1434882947 | Python | Python3 | py | Runtime Error | 0 | 0 | 275 | import sys
import math
n = int(input())
for s in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, input().strip().split())
angle1 = fabs(y2-y1)/fabs(x2-x1)
angle2 = fabs(y4-y3)/fabs(x4-x3)
if angle1 == angle2:
print("YES")
else:
print("NO") |
s675063898 | p00021 | u379956761 | 1434883170 | Python | Python3 | py | Runtime Error | 0 | 0 | 271 | import sys
import math
n = int(input())
for s in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, input().strip().split())
angle1 = abs(y2-y1)/abs(x2-x1)
angle2 = abs(y4-y3)/abs(x4-x3)
if angle1 == angle2:
print("YES")
else:
print("NO") |
s123211286 | p00021 | u379956761 | 1434883393 | Python | Python3 | py | Runtime Error | 0 | 0 | 281 | import sys
import math
n = int(input())
for s in range(n):
pos = list(map(float, input().split()))
angle1 = abs(pos[3]-pos[1])/abs(pos[2]-pos[0])
angle2 = abs(pos[7]-pos[5])/abs(pos[6]-pos[4])
if angle1 == angle2:
print("YES")
else:
print("NO") |
s673521679 | p00021 | u379956761 | 1434983103 | Python | Python3 | py | Runtime Error | 0 | 0 | 493 | N = input()
for n in range(N):
data = map(float,raw_input().split( ))
slopes = []
for i in range(2):
_x1 = data.pop(0)
_y1 = data.pop(0)
_x2 = data.pop(0)
_y2 = data.pop(0)
if _x1 != _x2:
slopes.append((_y1 - _y2)/(_x1 - _x2))
if len(slopes) == 0:
print "YES"
elif len(slopes) == 1:
print "NO"
elif abs(slopes[0] - slopes[1]) < 1e-10:
print "YES"
else:
print "NO" |
s749471360 | p00021 | u379956761 | 1434983291 | Python | Python3 | py | Runtime Error | 0 | 0 | 408 | import sys
import math
n = int(input())
for s in range(n):
pos = list(map(float, input().split()))
if pos[0] == pos[2] or pos[4] == pos[6]:
angle1 = 0
angle2 = 0
else:
angle1 = (pos[3]-pos[1])/(pos[2]-pos[0])
angle2 = (pos[7]-pos[5])/(pos[6]-pos[4])
if abs(angle1 - angle2) <= 1e-10 and angle1 + angle0 != 0:
print("YES")
else:
print("NO") |
s214592134 | p00021 | u379956761 | 1434983525 | Python | Python3 | py | Runtime Error | 0 | 0 | 497 | N = input()
for n in range(N):
data = map(float,raw_input().split( ))
slopes = []
for i in range(2):
_x1 = data.pop(0)
_y1 = data.pop(0)
_x2 = data.pop(0)
_y2 = data.pop(0)
if _x1 != _x2:
slopes.append((_y1 - _y2)/(_x1 - _x2))
if len(slopes) == 0:
print("YES")
elif len(slopes) == 1:
print("NO")
elif abs(slopes[0] - slopes[1]) < 1e-10:
print("YES")
else:
print("NO") |
s274253927 | p00021 | u379956761 | 1434983551 | Python | Python3 | py | Runtime Error | 0 | 0 | 493 | N = input()
for n in range(N):
data = map(float,input().split( ))
slopes = []
for i in range(2):
_x1 = data.pop(0)
_y1 = data.pop(0)
_x2 = data.pop(0)
_y2 = data.pop(0)
if _x1 != _x2:
slopes.append((_y1 - _y2)/(_x1 - _x2))
if len(slopes) == 0:
print("YES")
elif len(slopes) == 1:
print("NO")
elif abs(slopes[0] - slopes[1]) < 1e-10:
print("YES")
else:
print("NO") |
s153117428 | p00021 | u379956761 | 1434983569 | Python | Python3 | py | Runtime Error | 0 | 0 | 499 | N = input()
for n in range(N):
data = list(map(float,input().split( )))
slopes = []
for i in range(2):
_x1 = data.pop(0)
_y1 = data.pop(0)
_x2 = data.pop(0)
_y2 = data.pop(0)
if _x1 != _x2:
slopes.append((_y1 - _y2)/(_x1 - _x2))
if len(slopes) == 0:
print("YES")
elif len(slopes) == 1:
print("NO")
elif abs(slopes[0] - slopes[1]) < 1e-10:
print("YES")
else:
print("NO") |
s281914888 | p00021 | u071010747 | 1445249058 | Python | Python3 | py | Runtime Error | 0 | 0 | 322 | # -*- coding:utf-8 -*-
def main():
n=int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
a=(y2-y1)/(x2-x1)
b=(y4-y3)/(x4-x3)
if a==b:
print("YES")
else:
print("NO")
if __name__ == '__main__':
main() |
s167489493 | p00021 | u071010747 | 1445249433 | Python | Python3 | py | Runtime Error | 0 | 0 | 351 | # -*- coding:utf-8 -*-
def main():
for i in range(int(input())):
x1,y1,x2,y2,x3,y3,x4,y4=map(float,input().split())
a=(y2-y1)/(x2-x1)
b=(y4-y3)/(x4-x3)
if abs((x2-x1)*(y4-y3)-(x4-x3)*(y2-y1))<1e-10:
print("YES")
else:
print("NO")
if __name__ == '__main__':
main() |
s418056471 | p00021 | u489809100 | 1446521876 | Python | Python | py | Runtime Error | 0 | 0 | 202 | n = int(raw_input())
for i in xrange(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
z1 = (y1 - y2) / (x1 - x2)
z2 = (y3 - y4) / (x3 - x4)
if z1 == z2:
print "YES"
else:
print "NO" |
s858112246 | p00021 | u489809100 | 1446521971 | Python | Python | py | Runtime Error | 0 | 0 | 204 | n = int(raw_input())
for i in range(0, n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
z1 = (y1 - y2) / (x1 - x2)
z2 = (y3 - y4) / (x3 - x4)
if z1 == z2:
print "YES"
else:
print "NO" |
s435184025 | p00021 | u489809100 | 1446522018 | Python | Python | py | Runtime Error | 0 | 0 | 204 | n = int(raw_input())
for i in range(0, n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
z1 = (y1 - y2) / (x1 - x2)
z2 = (y3 - y4) / (x3 - x4)
if z1 == z2:
print "YES"
else:
print "NO" |
s710708063 | p00021 | u140201022 | 1446985626 | Python | Python | py | Runtime Error | 0 | 0 | 232 | n=int(raw_input())
def parallel(x1,y1,x2,y2,x3,y3,x4,y4):
print 'YES' if (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4) else 'NO'
while n:
n-=1
l=map(float,raw_input().split())
parallel(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]) |
s455235250 | p00021 | u560214129 | 1450448443 | Python | Python3 | py | Runtime Error | 0 | 0 | 318 | import sys
cases = int(input())
i = 0
while i < cases:
for line in sys.stdin.readlines():
x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 = map(float,line.split())
m1 = (y2 - y1)/(x2 - x1)
m2 = (y4 - y3)/(x4 - x3)
if(m1 == m2):
print("YES")
else:
print("NO")
i += 1 |
s822945878 | p00021 | u560214129 | 1450449771 | Python | Python3 | py | Runtime Error | 0 | 0 | 352 | import sys
cases = int(input())
i = 0
while i < cases:
#for line in sys.stdin.readlines():
x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 = map(float,input().split())
dy1 = y2 - y1
dy2 = y4 - y3
dx1 = x2 - x1
dx2 = x4 - x3
if(dy1*dx2 == dy2*dx1):
print("YES")
else:
print("NO")
i += 1 |
s416967717 | p00021 | u560214129 | 1450449957 | Python | Python3 | py | Runtime Error | 0 | 0 | 331 | import sys
cases = int(input())
i = 0
while i <= cases:
#for line in sys.stdin.readlines():
x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 = map(float,input().split())
dy1 = y2 - y1
dy2 = y4 - y3
dx1 = x2 - x1
dx2 = x4 - x3
k=dy1*dx2
l=dy2*dx1
if( k==l ):
print("YES")
else:
print("NO")
i += 1 |
s264397132 | p00021 | u560214129 | 1450449989 | Python | Python3 | py | Runtime Error | 0 | 0 | 329 | import sys
cases = int(input())
i = 0
while i <= cases:
#for line in sys.stdin.readlines():
x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 = map(float,input().split())
dy1 = y2 - y1
dy2 = y4 - y3
dx1 = x2 - x1
dx2 = x4 - x3
k=dy1*dx2
l=dy2*dx1
if(k==l):
print("YES")
else:
print("NO")
i += 1 |
s652859199 | p00021 | u560214129 | 1450450285 | Python | Python3 | py | Runtime Error | 0 | 0 | 347 | import sys
cases = int(input())
i = 0
while i <= cases:
#for line in sys.stdin.readlines():
x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 = map(float,input().split())
dy1 = y2 - y1
dy2 = y4 - y3
dx1 = x2 - x1
dx2 = x4 - x3
k=round(dy1*dx2,5)
l=round(dy2*dx1,5)
if(k==l):
print("YES")
else:
print("NO")
i += 1 |
s592732196 | p00021 | u211905117 | 1450856120 | Python | Python3 | py | Runtime Error | 0 | 0 | 195 | N = int(input())
for _ in range(0, N) :
x1,y1,x2,y2,x3,y3,x4,y4 = list(map(int, input().split()))
if ((y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)) :
print("YES")
else :
print("NO") |
s644668804 | p00021 | u211905117 | 1450856251 | Python | Python3 | py | Runtime Error | 0 | 0 | 199 | N = int(input())
for _ in range(0, N) :
x1,y1,x2,y2,x3,y3,x4,y4 = list(map(float, input().split()))
if ((y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)) :
print("YES")
else :
print("NO") |
s011357372 | p00021 | u211905117 | 1450856274 | Python | Python3 | py | Runtime Error | 0 | 0 | 199 | N = int(input())
for _ in range(0, N) :
x1,y1,x2,y2,x3,y3,x4,y4 = list(map(float, input().split()))
if ((y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)) :
print("YES")
else :
print("NO") |
s963524934 | p00021 | u211905117 | 1450856290 | Python | Python3 | py | Runtime Error | 0 | 0 | 199 | N = int(input())
for i in range(0, N) :
x1,y1,x2,y2,x3,y3,x4,y4 = list(map(float, input().split()))
if ((y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)) :
print("YES")
else :
print("NO") |
s325480458 | p00021 | u825618558 | 1451573794 | Python | Python3 | py | Runtime Error | 0 | 0 | 531 | import sys
lines = sys.stdin.readlines()
size = int(lines[0])
data = lines[1:len(lines)]
for line in data:
line = line.split(" ")
inp = []
for i in line:
inp.append(float(i))
x = []
x.append(inp[0])
x.append(inp[2])
x.append(inp[4])
x.append(inp[6])
y = []
y.append(inp[1])
y.append(inp[3])
y.append(inp[5])
y.append(inp[7])
tilt1 = (y[1]-y[0])/(x[1]-x[0])
tilt2 = (y[3]-y[2])/(x[3]-x[2])
if tilt1==tilt2:
print ("YES")
else:
print ("NO") |
s768531072 | p00021 | u749493116 | 1452445381 | Python | Python | py | Runtime Error | 0 | 0 | 428 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class point:
def __init__(self, x, y):
self.x = x
self.y = y
n = int(raw_input())
for i in range(n):
xa, ya, xb, yb, xc, yc, xd, yd = map(float, raw_input().split(" "))
a = point(xa, ya)
b = point(xb, yb)
c = point(xc, yc)
d = point(xd, yd)
if (a.y - b.y)/(a.x - b.x) - (c.y - d.y)/(c.x - d.x) < 1e-9:print "YES"
else:print "NO"
|
s935702599 | p00021 | u797673668 | 1452703326 | Python | Python3 | py | Runtime Error | 0 | 0 | 177 | n = int(input())
for _ in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print('YES' if (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4) else 'NO') |
s948559548 | p00021 | u777299405 | 1453619969 | Python | Python3 | py | Runtime Error | 0 | 0 | 177 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print("YES" if (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4) else "NO") |
s387594570 | p00021 | u777299405 | 1453620105 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print("YES" if abs((x1 - x2) / (y1 - y2)) == abs((x3 - x4) / (y3 - y4)) else "NO") |
s294790697 | p00021 | u777299405 | 1453621927 | Python | Python3 | py | Runtime Error | 0 | 0 | 290 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
x2 -= x1
y2 -= y1
x4 -= x3
y4 -= y3
if x2 == 0 or x4 == 0:
print("YES" if x2 == x4 == 0 else "NO")
else:
print("YES" if x2 / y2 == x4 / y4 else "NO") |
s241150214 | p00021 | u650459696 | 1458572881 | Python | Python3 | py | Runtime Error | 0 | 0 | 192 | for i in range(int(input())):
s = list(map(float,input().split()))
if (s[0] - s[2]) / (s[1] - s[3]) == (s[4] - s[6]) / (s[5] - s[7]):
print('YES')
else:
print('NO') |
s765083054 | p00021 | u148101999 | 1459230067 | Python | Python | py | Runtime Error | 0 | 0 | 225 | x = input()
for i in xrange(x):
grad1,grad2 = 0, 0
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
grad1, grad2 = ((y1 - y2)/(x1 - x2)), ((y3 - y4)/(x3 - x4))
if grad1 == grad2:
print "YES"
else:
print "NO" |
s109257416 | p00021 | u148101999 | 1459231155 | Python | Python | py | Runtime Error | 0 | 0 | 219 | for i in xrange(input()):
grad1, grad2 = 0, 0
x1,y1,x2,y2,x3,y3,x4,y4=map(float,raw_input().split())
grad1, grad2 = (y1 - y2)*(x3 - x4) , (y3 - y4)*(x1 - x2)
if grad1 - grad2 == 0:
print "YES"
else:
print "NO" |
s391565769 | p00021 | u130979865 | 1459946373 | Python | Python | py | Runtime Error | 0 | 0 | 454 | # -*- coding: utf-8 -*-
class Point_Class():
def __init__(self, x, y):
self.x = x
self.y = y
def slope(p1, p2):
return (p2.y-p1.y)/(p2.x-p1.x)
n = int(raw_input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
p1 = Point_Class(x1, y1)
p2 = Point_Class(x2, y2)
p3 = Point_Class(x3, y3)
p4 = Point_Class(x4, y4)
print "YES" if slope(p1, p2) == slope(p3, p4) else "NO" |
s251379144 | p00021 | u130979865 | 1459946456 | Python | Python | py | Runtime Error | 0 | 0 | 498 | # -*- coding: utf-8 -*-
import sys
class Point_Class():
def __init__(self, x, y):
self.x = x
self.y = y
def slope(p1, p2):
return (p2.y-p1.y)/(p2.x-p1.x) if p2.x != p1.x else sys.intmax
n = int(raw_input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
p1 = Point_Class(x1, y1)
p2 = Point_Class(x2, y2)
p3 = Point_Class(x3, y3)
p4 = Point_Class(x4, y4)
print "YES" if slope(p1, p2) == slope(p3, p4) else "NO" |
s911120481 | p00021 | u925992597 | 1460629495 | Python | Python3 | py | Runtime Error | 0 | 0 | 749 | class line():
def __init__(self):
self.p={"x":0,"y":0}
self.q={"x":0,"y":0}
def setPoint(self,px,py,qx,qy):
self.p["x"]=px
self.p["y"]=py
self.q["x"]=qx
self.q["y"]=qy
def getVector(self,rev=False):
if(rev):
return ((self.p["x"]-self.q["x"]),(self.p["y"]-self.q["y"]))
else:
return ((self.q["x"]-self.p["x"]),(self.q["y"]-self.p["y"]))
def main():
l=line()
m=line()
for i in range(0,int(input())):
(lambda x:(l.setPoint(*(x[0:4])),m.setPoint(*(x[4:8]))))(tuple(map(float,input().split(" "))))
if((l.getVector()==(0,0))or(m.getVector()==(0,0))):
print("NO")
elif((lambda l,m:(l[0]/m[0])==(l[1]/m[1]))(l.getVector(),m.getVector())):
print("YES")
else:
print("NO")
if __name__ == '__main__':
main() |
s074377718 | p00021 | u925992597 | 1460629673 | Python | Python3 | py | Runtime Error | 0 | 0 | 749 | class line():
def __init__(self):
self.p={"x":0,"y":0}
self.q={"x":0,"y":0}
def setPoint(self,px,py,qx,qy):
self.p["x"]=px
self.p["y"]=py
self.q["x"]=qx
self.q["y"]=qy
def getVector(self,rev=False):
if(rev):
return ((self.p["x"]-self.q["x"]),(self.p["y"]-self.q["y"]))
else:
return ((self.q["x"]-self.p["x"]),(self.q["y"]-self.p["y"]))
def main():
l=line()
m=line()
for i in range(0,int(input())):
(lambda x:(l.setPoint(*(x[0:4])),m.setPoint(*(x[4:8]))))(tuple(map(float,input().split(" "))))
if((l.getVector()==(0,0))or(m.getVector()==(0,0))):
print("NO")
elif((lambda l,m:(l[0]/m[0])==(l[1]/m[1]))(l.getVector(),m.getVector())):
print("YES")
else:
print("NO")
if __name__ == '__main__':
main() |
s925092183 | p00021 | u203261375 | 1467534227 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | 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) == (y3-y4)/(x3-x4):
print('YES')
else:
print('NO') |
s246204797 | p00021 | u203261375 | 1467534510 | Python | Python3 | py | Runtime Error | 0 | 0 | 319 | n = int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float, input().split())
if x1-x2 == 0 or x3-x4 ==0:
if x1-x2 == 0 and x3-x4 ==0:
print('YES')
else:
print('NO')
if (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4):
print('YES')
else:
print('NO') |
s968213507 | p00021 | u582608581 | 1471405513 | Python | Python3 | py | Runtime Error | 0 | 0 | 197 | N = (eval(input()))
for _ in range(N):
x1, y1, x2, y2, x3, y3, x4, y4 = [eval(item) for item in input().split()]
if (x1 - x2)/(y1 - y2) == (x3 - x4)/(y3 - y4):
print('YES')
else:
print('NO') |
s853618302 | p00021 | u582608581 | 1471405520 | Python | Python3 | py | Runtime Error | 0 | 0 | 197 | N = (eval(input()))
for _ in range(N):
x1, y1, x2, y2, x3, y3, x4, y4 = [eval(item) for item in input().split()]
if (x1 - x2)/(y1 - y2) == (x3 - x4)/(y3 - y4):
print('YES')
else:
print('NO') |
s540000425 | p00021 | u582608581 | 1471406521 | Python | Python3 | py | Runtime Error | 0 | 0 | 270 | N = (eval(input()))
for _ in range(N):
x1, y1, x2, y2, x3, y3, x4, y4 = [eval(item) for item in input().split()]
if (x1 == x2 and x3 == x4) or (y1 == y2 and y3 == y4):
print('YES')
elif (x1 - x2)/(y1 - y2) == (x3 - x4)/(y3 - y4):
print('YES')
else:
print('NO') |
s624833265 | p00021 | u582608581 | 1471417097 | Python | Python3 | py | Runtime Error | 0 | 0 | 268 | N = eval(input())
for _ in range(N):
x1, y1, x2, y2, x3, y3, x4, y4 = [eval(item) for item in input().split()]
if (x1 == x2 and x3 == x4) or (y1 == y2 and y3 == y4):
print('YES')
elif (x1 - x2)/(y1 - y2) == (x3 - x4)/(y3 - y4):
print('YES')
else:
print('NO') |
s867472313 | p00021 | u379499530 | 1473053920 | Python | Python | py | Runtime Error | 0 | 0 | 188 | import math
n = input()
for i in xrange(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
print "YES" if (y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4) else "NO" |
s990033500 | p00021 | u379499530 | 1473053968 | Python | Python | py | Runtime Error | 0 | 0 | 176 | n = input()
for i in xrange(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
print "YES" if (y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4) else "NO" |
s462749416 | p00021 | u379499530 | 1473054033 | Python | Python | py | Runtime Error | 0 | 0 | 182 | n = input()
for i in xrange(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4): print "YES"
else: "NO" |
s214655675 | p00021 | u058433718 | 1474069552 | Python | Python3 | py | Runtime Error | 0 | 0 | 703 | # ????????????????????°??????
import sys
def is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
a1 = (y2 - y1) / (x2 - x1)
a2 = (y4 - y3) / (x4 - x3)
return a1 == a2
def main():
n = int(sys.stdin.readline().strip())
for _ in range(n):
data = sys.stdin.readline().strip().split(' ')
x1 = float(data[0])
y1 = float(data[1])
x2 = float(data[2])
y2 = float(data[3])
x3 = float(data[4])
y3 = float(data[5])
x4 = float(data[6])
y4 = float(data[7])
if is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
print('YES')
else:
print('NO')
if __name__ == '__main__':
main() |
s681134116 | p00021 | u058433718 | 1474070563 | Python | Python3 | py | Runtime Error | 0 | 0 | 862 | # ????????????????????°??????
import sys
def is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
d1x = x2 - x1
d1y = y2 - y1
d2x = x4 - x3
d2y = y4 - y3
if d1x != 0 and d2x != 0:
a1 = d1y / d1x
a2 = d2y / d2y
return a1 == a2
if d1x == 0 and d2x == 0:
return True
return False
def main():
n = int(sys.stdin.readline().strip())
for _ in range(n):
data = sys.stdin.readline().strip().split(' ')
x1 = float(data[0])
y1 = float(data[1])
x2 = float(data[2])
y2 = float(data[3])
x3 = float(data[4])
y3 = float(data[5])
x4 = float(data[6])
y4 = float(data[7])
if is_parallel(x1, y1, x2, y2, x3, y3, x4, y4):
print('YES')
else:
print('NO')
if __name__ == '__main__':
main() |
s966651454 | p00021 | u372789658 | 1475864518 | Python | Python3 | py | Runtime Error | 0 | 0 | 364 | num=int(input())
for i in range (num):
info=list(map(float,input().split()))
if info[2]==info[0]:
if info[6]==info[4]:
print("YES")
else:
print("NO")
else:
if (info[3]-info[1])/(info[2]-info[0])==(info[7]-info[5])/(info[6]-info[4]):
print("YES")
else:
print("NO")
|
s431161027 | p00021 | u372789658 | 1475903091 | Python | Python3 | py | Runtime Error | 0 | 0 | 364 | num=int(input())
for i in range (num):
info=list(map(float,input().split()))
if info[2]==info[0]:
if info[6]==info[4]:
print("YES")
else:
print("NO")
else:
if (info[3]-info[1])/(info[2]-info[0])==(info[7]-info[5])/(info[6]-info[4]):
print("YES")
else:
print("NO")
|
s348378651 | p00021 | u372789658 | 1475903443 | Python | Python3 | py | Runtime Error | 0 | 0 | 364 | num=int(input())
for i in range (num):
info=list(map(float,input().split()))
if info[2]==info[0]:
if info[6]==info[4]:
print("YES")
else:
print("NO")
else:
if (info[3]-info[1])/(info[2]-info[0])==(info[7]-info[5])/(info[6]-info[4]):
print("YES")
else:
print("NO")
|
s970399047 | p00021 | u660912567 | 1480087558 | Python | Python3 | py | Runtime Error | 0 | 0 | 182 | for i in range(int(input())):
l = list(map(float,input().split()))
ab, cd = (l[2]-l[0])/(l[3]-l[1]), (l[6]-l[4])/(l[7]-l[5])
if ab==cd: print('YES')
else: print('NO') |
s281284382 | p00021 | u660912567 | 1480088102 | Python | Python3 | py | Runtime Error | 0 | 0 | 202 | for i in range(int(input())):
l = list(map(float,input().split()))
a,b,c,d = l[2]-l[0],l[3]-l[1],l[6]-l[4],l[7]-l[5]
if b==0 or d==0: next
if a/b==c/d: print('YES')
else: print('NO') |
s616910459 | p00021 | u123687446 | 1481292965 | Python | Python3 | py | Runtime Error | 0 | 0 | 299 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = list(map(float, input().split()))
s = [x2-x1, y2-y1]
t = [x4-x3, y4-y3]
if not (s[0] or t[0]):
print("YES")
continue
if s[1]/s[0] == t[1]/t[0]:
print("YES")
else:
print("NO") |
s828680570 | p00021 | u898097781 | 1481390867 | Python | Python | py | Runtime Error | 0 | 0 | 202 | n = int(raw_input())
for i in range(n):
x0, y0, x1, y1, x2, y2, x3, y3 = raw_input().split()
if float(y1-y0)/(x1-x0) == float(y3-y2)/(x3-x2):
print 'YES'
else:
print 'NO' |
s127716592 | p00021 | u898097781 | 1481390912 | Python | Python | py | Runtime Error | 0 | 0 | 214 | n = int(raw_input())
for i in range(n):
x0, y0, x1, y1, x2, y2, x3, y3 = map(float, raw_input().split())
if float(y1-y0)/(x1-x0) == float(y3-y2)/(x3-x2):
print 'YES'
else:
print 'NO' |
s341119049 | p00021 | u898097781 | 1481390960 | Python | Python | py | Runtime Error | 0 | 0 | 217 | n = int(raw_input())
for i in range(n):
x0, y0, x1, y1, x2, y2, x3, y3 = map(float, raw_input().split(' '))
if float(y1-y0)/(x1-x0) == float(y3-y2)/(x3-x2):
print 'YES'
else:
print 'NO' |
s861523131 | p00021 | u661290476 | 1482221834 | Python | Python3 | py | Runtime Error | 0 | 0 | 171 | while True:
try:
a=[float(i) for i in input().split()]
except:
break
print("YES" if (a[3]-a[1])/(a[2]-a[0])==(a[7]-a[5])/(a[6]-a[4]) else "NO") |
s301493776 | p00021 | u661290476 | 1482222145 | Python | Python3 | py | Runtime Error | 0 | 0 | 261 | while True:
try:
a=[float(i) for i in input().split()]
except:
break
dx1=a[2]-a[0]
dy1=a[3]-a[1]
dx2=a[6]-a[4]
dy2=a[7]-a[5]
if dx1==0 and dx2==0 or dy1/dx1==dy2/dx2:
print("YES")
else:
print("NO") |
s475221292 | p00021 | u661290476 | 1482222372 | Python | Python3 | py | Runtime Error | 0 | 0 | 360 | while True:
try:
a=[float(i) for i in input().split()]
except:
break
dx1=a[2]-a[0]
dy1=a[3]-a[1]
dx2=a[6]-a[4]
dy2=a[7]-a[5]
if dx1==0 or dx2==0:
if dx1==0 and dx2==0:
print("YES")
else:
print("NO")
elif dy1/dx1==dy2/dx2:
print("YES")
else:
print("NO") |
s816353689 | p00021 | u711765449 | 1484412917 | Python | Python3 | py | Runtime Error | 0 | 0 | 316 | # -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
k1 = (y2-y1)/(x2-x1)
k2 = (y4-y3)/(x4-x3)
if k1 == k2:
print('YES')
else:
print('NO')
n = int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
check_para(x1,y1,x2,y2,x3,y3,x4,y4) |
s594111180 | p00021 | u711765449 | 1484413603 | Python | Python3 | py | Runtime Error | 0 | 0 | 325 | # -*- coding:utf-8 -*-
def check_para(x1,y1,x2,y2,x3,y3,x4,y4):
k1 = (y2-y1)/(x2-x1)
k2 = (y4-y3)/(x4-x3)
if abs(k1-k2) < 1e-10:
print('YES')
else:
print('NO')
n = int(input())
for i in range(n):
x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
check_para(x1,y1,x2,y2,x3,y3,x4,y4) |
s517799363 | p00021 | u078042885 | 1485354245 | Python | Python3 | py | Runtime Error | 0 | 0 | 152 | for _ in range(int(input())):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
print(['NO','YES'][(by-ay)/(bx-ax)==(dy-cy)/(dx-cx)]) |
s883878207 | p00021 | u252414452 | 1486559383 | Python | Python | py | Runtime Error | 0 | 0 | 343 | def to_f(e):
return float(e)
n = int(raw_input().rstrip())
for i in range(n):
line = raw_input().rstrip()
l = map(to_f, line.split(" "))
x1 = l[0]
y1 = l[1]
x2 = l[2]
y2 = l[3]
x3 = l[4]
y3 = l[5]
x4 = l[6]
y4 = l[7]
m1 = (y2-y1)/(x2-x1)
m2 = (y4-y3)/(x4-x3)
if m1 == m2:
print "YES"
else:
print "NO" |
s915884284 | p00021 | u252414452 | 1486559413 | Python | Python | py | Runtime Error | 0 | 0 | 343 | def to_f(e):
return float(e)
n = int(raw_input().rstrip())
for i in range(n):
line = raw_input().rstrip()
l = map(to_f, line.split(" "))
x1 = l[0]
y1 = l[1]
x2 = l[2]
y2 = l[3]
x3 = l[4]
y3 = l[5]
x4 = l[6]
y4 = l[7]
m1 = (y2-y1)/(x2-x1)
m2 = (y4-y3)/(x4-x3)
if m1 == m2:
print "YES"
else:
print "NO" |
s621090086 | p00021 | u179694829 | 1490057727 | Python | Python3 | py | Runtime Error | 0 | 0 | 235 | n = int(input())
for i in range(n):
line = list(map(float,input().split()))
AB = (line[3] - line[1]) / (line[2] - line[0])
CD = (line[7] - line[5]) / (line[6] - line[4])
if round(AB - CD,8) == 0:
print("YES")
else:
print("NO") |
s457918935 | p00021 | u179694829 | 1490057796 | Python | Python3 | py | Runtime Error | 0 | 0 | 235 | n = int(input())
for i in range(n):
line = list(map(float,input().split()))
AB = (line[3] - line[1]) / (line[2] - line[0])
CD = (line[7] - line[5]) / (line[6] - line[4])
if round(AB - CD,8) == 0:
print("YES")
else:
print("NO") |
s380313361 | p00021 | u179694829 | 1490058222 | Python | Python3 | py | Runtime Error | 0 | 0 | 365 | n = int(input())
for i in range(n):
line = list(map(float,input().split()))
if round(line[2] - line[0], 2) == 0:
if round(line[6] - line[4], 2) == 0:
print("YES")
else:
print("NO")
else:
AB = (line[3] - line[1]) / (line[2] - line[0])
CD = (line[7] - line[5]) / (line[6] - line[4])
if round(AB - CD, 8) == 0:
print("YES")
else:
print("NO") |
s020375480 | p00021 | u179694829 | 1490058325 | Python | Python3 | py | Runtime Error | 0 | 0 | 365 | n = int(input())
for i in range(n):
line = list(map(float,input().split()))
if round(line[2] - line[0], 2) == 0:
if round(line[6] - line[4], 2) == 0:
print("YES")
else:
print("NO")
else:
AB = (line[3] - line[1]) / (line[2] - line[0])
CD = (line[7] - line[5]) / (line[6] - line[4])
if round(AB - CD, 8) == 0:
print("YES")
else:
print("NO") |
s696703158 | p00021 | u179694829 | 1490075073 | Python | Python3 | py | Runtime Error | 0 | 0 | 365 | from fractions import Fraction
def sroap(x1,y1,x2,y2):
if x2 - x1 == 0:
return float("inf")
else:
return Fraction(y2 - y1,x2 - x1)
N = int(input())
for n in range(N):
Ax,Ay,Bx,By,Cx,Cy,Dx,Dy = map(lambda x: round(x * 10 ** 5),(map(float,input().split())))
if sroap(Ax,Ay,Bx,By) == sroap(Cx,Cy,Dx,Dy):
????????????print("YES")
else:
print("NO") |
s447210616 | p00021 | u073709667 | 1490779671 | Python | Python3 | py | Runtime Error | 0 | 0 | 180 | 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") |
s652594347 | p00021 | u073709667 | 1490779695 | Python | Python3 | py | Runtime Error | 0 | 0 | 180 | 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") |
s125547760 | p00021 | u868716420 | 1493850674 | Python | Python3 | py | Runtime Error | 0 | 0 | 222 | for _ in range(int(input())) :
x1, y1, x2, y2, x3, y3, x4, y4 = [float(__) for __ in input().split()]
a, b = ((y2 - y1) / (x2 - x1)), ((y4 - y3) / (x4 - x3))
if a == b : print('YES')
else : print('NO') |
s933695897 | p00021 | u618637847 | 1494900900 | Python | Python3 | py | Runtime Error | 0 | 0 | 264 |
import mth
num = int(input())
for i in range(num):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split(' '))
aaa = (y1 - y2) * (x3 - x4)
bbb = (y3 - y4) * (x1 - x2)
if abs(aaa - bbb) <= 0:
print('YES')
else:
print('NO') |
s650280416 | p00021 | u362104929 | 1496399040 | Python | Python3 | py | Runtime Error | 0 | 0 | 218 | n = int(input())
for _ in range(n):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
a1 = (ay-by)/(ax-bx)
a2 = (cy-dy)/(cy-dy)
if a1 == a2:
print("YES")
else:
print("NO") |
s944499272 | p00021 | u362104929 | 1496399192 | Python | Python3 | py | Runtime Error | 0 | 0 | 218 | n = int(input())
for _ in range(n):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
a1 = (ay-by)/(ax-bx)
a2 = (cy-dy)/(cy-dy)
if a1 == a2:
print("YES")
else:
print("NO") |
s255871746 | p00021 | u362104929 | 1496399427 | Python | Python3 | py | Runtime Error | 0 | 0 | 259 | n = int(input())
ans = []
for _ in range(n):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
a1 = (ay-by)/(ax-bx)
a2 = (cy-dy)/(cy-dy)
if a1 == a2:
ans.append("YES")
else:
ans.append("NO")
print(*ans, sep="\n") |
s221498235 | p00021 | u362104929 | 1496399551 | Python | Python3 | py | Runtime Error | 0 | 0 | 271 | n = int(input())
ans = []
for _ in range(n):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
a1 = (ay - by) / (ax - bx)
a2 = (cy - dy) / (cy - dy)
if a1 == a2:
ans.append("YES")
else:
ans.append("NO")
print(*ans, sep="\n") |
s355783254 | p00021 | u362104929 | 1496399630 | Python | Python3 | py | Runtime Error | 0 | 0 | 271 | n = int(input())
ans = []
for _ in range(n):
ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
a1 = (ay - by) / (ax - bx)
a2 = (cy - dy) / (cx - dx)
if a1 == a2:
ans.append("YES")
else:
ans.append("NO")
print(*ans, sep="\n") |
s269541586 | p00021 | u362104929 | 1496402164 | Python | Python3 | py | Runtime Error | 0 | 0 | 837 | from fractions import Fraction
def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
a1 = Fraction((y2-y1), (x2-x1)) if (x2-x1) != 0 else float("inf")
a2 = Fraction((y4-y3), (x4-x3)) if (x4-x3) != 0 else float("inf")
if a1 == a2:
return "YES"
else:
return "NO"
if __name__ == "__main__":
assert parallelism(0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 2.0, 1.0) == "YES", "sample1"
assert parallelism(3.0, 2.0, 9.0, 6.0, 13.0, 5.0, 7.0, 9.0) == "NO", "sample2"
assert parallelism(3.0, 2.0, 9.0, 2.0, 13.0, 5.0, 7.0, 5.0) == "YES", "horizontal line"
assert parallelism(3.0, 2.0, 3.0, 6.0, 13.0, 5.0, 13.0, 9.0) == "YES", "vertical line"
n = int(input())
for _ in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print(parallelism(x1, y1, x2, y2, x3, y3, x4, y4)) |
s005388826 | p00021 | u957840591 | 1497489094 | Python | Python3 | py | Runtime Error | 0 | 0 | 376 | from numpy import *
ABs=[]
CDs=[]
n = int(input())
for i in range(n):
x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4, = map(float, input().split())
AB = array([x_2 - x_1, y_2 - y_1])
CD = array([x_4 - x_3, y_4 - y_3])
ABs.append(AB)
CDs.append(CD)
for i in range(n):
if linalg.norm(cross(ABs[i],CDs[i]))==0.0:
print("YES")
else:
print("NO") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.