s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s791435747 | p00012 | u018967850 | 1464272938 | Python | Python | py | Runtime Error | 0 | 0 | 374 | # coding: utf-8
# Here your code !
# coding: utf-8
import numpy as np
l = map(float, raw_input().split())
x1 = l[2]-l[0]
x2 = l[3]-l[1]
y1 = l[4]-l[0]
y2 = l[5]-l[1]
p1 = l[6]-l[0]
p2 = l[7]-l[1]
matrix_A = np.array([[x1,y1],[x2,y2]])
vector_p = np.array([p1,p2])
x = np.linalg.solve(matrix_A, vector_p)
if 0<abs(x[0])+abs(x[1])<1:
print "Yes"
else:
print "No" | File "/tmp/tmp__5r8uyp/tmp83rzndes.py", line 22
print "Yes"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s890586663 | p00012 | u018967850 | 1464273308 | Python | Python | py | Runtime Error | 0 | 0 | 452 | i = 1
while True:
l = map(float, raw_input().split())
x1 = l[2]-l[0]
x2 = l[3]-l[1]
y1 = l[4]-l[0]
y2 = l[5]-l[1]
p1 = l[6]-l[0]
p2 = l[7]-l[1]
matrix_A = np.array([[x1,y1],[x2,y2]])
vector_p = np.array([p1,p2])
x = np.linalg.solve(matrix_A, vector_p)
if 0<abs(x[0])+abs(x[1])<1:
print "Yes"
else:
print "No"
if i > 100:
break
i += 1
| File "/tmp/tmptpshs6y7/tmps1ozkax1.py", line 20
print "Yes"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s304881650 | p00012 | u358919705 | 1471861204 | Python | Python3 | py | Runtime Error | 0 | 0 | 506 | import math
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
except:
break
x = [x1, x2, x3, x1]
y = [y1, y2, y3, y1]
x = list(map(lambda i: i - xp, x))
y = list(map(lambda i: i - yp, y))
s = lambda a1, a2, b1, b2: abs(a1 * b2 - a2 * b1)
sum = sum(s(x[i], y[i], x[i + 1], y[i + 1]) for i in range(3))
S = s(x[1] - x[0], y[1] - y[0], x[2] - x[0], y[2] - y[0])
if sum == S:
print('YES')
else:
print('NO') | ||
s271136969 | p00012 | u607831289 | 1473132482 | Python | Python | py | Runtime Error | 0 | 0 | 386 | import sys
datasets = sys.stdin
def between(xa, xb, xp):
return xa < xp < xb or xb < xp < xa
for dataset in datasets:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, dataset.split())
if between(x1, x2, xp) and beteen(y1, y2, yp) and between(x2, x3, xp) and between(y2, y3, yp) and between(x3, x1, xp) and between(y3, y1, yp):
print 'YES'
else:
print 'NO' | File "/tmp/tmpctuy8dct/tmprfzshtco.py", line 12
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s862672039 | p00012 | u607831289 | 1473133111 | Python | Python | py | Runtime Error | 0 | 0 | 386 | import sys
datasets = sys.stdin
def between(xa, xb, xp):
return xa < xp < xb or xb < xp < xa
for dataset in datasets:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, dataset.split())
if between(x1, x2, xp) and beteen(y1, y2, yp) and between(x2, x3, xp) and between(y2, y3, yp) and between(x3, x1, xp) and between(y3, y1, yp):
print 'YES'
else:
print 'NO' | File "/tmp/tmpx0odv87o/tmphozq_cpl.py", line 12
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s423219026 | p00012 | u922871577 | 1479281289 | Python | Python | py | Runtime Error | 0 | 0 | 474 | import sys
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
AB = [x2-x1, y2-y1]
BP = [xp-x2, yp-y2]
BC = [x3-x2, y3-y2]
CP = [xp-x3, yp-y3]
CA = [x1-x3, y1-y3]
BP = [xp-x1, yp-y1]
c1 = AB[0] * BP[1] - AB[1] * BP[0]
c2 = BC[0] * CP[1] - BC[1] * CP[0]
c3 = CA[0] * AP[1] - CA[1] * AP[0]
if (c1>0 and c2>0 and c3>0) or (c1<0 and c2<0 and c3<0):
print 'YES'
else:
print 'NO' | File "/tmp/tmpi4xub124/tmpw4y5jh3w.py", line 15
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s050683345 | p00012 | u922871577 | 1479281315 | Python | Python | py | Runtime Error | 0 | 0 | 467 | import sys
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
AB = [x2-x1, y2-y1]
BP = [xp-x2, yp-y2]
BC = [x3-x2, y3-y2]
CP = [xp-x3, yp-y3]
CA = [x1-x3, y1-y3]
BP = [xp-x1, yp-y1]
c1 = AB[0] * BP[1] - AB[1] * BP[0]
c2 = BC[0] * CP[1] - BC[1] * CP[0]
c3 = CA[0] * AP[1] - CA[1] * AP[0]
if (c1>0 and c2>0 and c3>0) or (c1<0 and c2<0 and c3<0):
print 'YES'
else:
print 'NO' | File "/tmp/tmpwzo9k0xs/tmpqo0wqrug.py", line 15
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s205776151 | p00012 | u140201022 | 1482425956 | Python | Python3 | py | Runtime Error | 0 | 0 | 753 | #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
int main(){
double x1,y1,x2,y2,x3,y3,xp,yp;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
if (((x2-x1)*(y2-y3))-((y1-y3)*(x2-x3))>0 && ((x3-x2)*(y3-yp))-((y1-yp)*(x3-xp))>0) {
//if(((x2-x1)*(y2-yp)-(y2-y1)*(x2-xp)>0)&&((x3-x2)*(y3-yp)-(y3-y2)*(x3-xp)>0)&&((x1-x3)*(y1-yp)-(y1-y3)*(x1-xp)>0)){
printf("YES\n");
//}else if(((x2-x1)*(y2-yp)-(y2-y1)*(x2-xp)<0)&&((x3-x2)*(y3-yp)-(y3-y2)*(x3-xp)<0)&&((x1-x3)*(y1-yp)-(y1-y3)*(x1-xp)<0)){
// printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
} | File "/tmp/tmpr560b3tz/tmpjv1pkqt_.py", line 7
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s915712620 | p00012 | u151242583 | 1494902708 | Python | Python3 | py | Runtime Error | 0 | 0 | 466 | import sys
lines = str(sys.stdin.read()).strip().split("\n")
for line in lines:
data = line.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])
xp = float(data[6])
yp = float(data[7])
if xp > min(x1, x2, x3) and
xp < max(x1, x2, x3) and
yp > min(y1, y2, y3) and
yp < max(y1, y2, y3):
print("YES")
else:
print("NO") | File "/tmp/tmpjf40dvnm/tmp5ir4p6tj.py", line 14
if xp > min(x1, x2, x3) and
^
SyntaxError: invalid syntax
| |
s567742821 | p00012 | u354053070 | 1501926604 | Python | Python3 | py | Runtime Error | 0 | 0 | 449 | import sys
def isleft(ox, oy, ax, ay, px, py):
oax, oay = ax - ox, ay - oy
opx, opy = px - ox, py - oy
if oax * opy > oay * opx:
return 1
else:
return 0
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
A, B, C, P = (x1, y1), (x2, y2), (x3, y3), (xp, yp)
if isleft(*A, *B, *P) == isleft(*B, *C, *P) == isleft(*C, *A, *P):
print("YES")
else:
print("NO") | ||
s566813078 | p00012 | u354053070 | 1501926970 | Python | Python3 | py | Runtime Error | 0 | 0 | 455 | import sys
def isleft(ox, oy, ax, ay, px, py):
oax, oay = ax - ox, ay - oy
opx, opy = px - ox, py - oy
if oax * opy > oay * opx:
return 1
else:
return 0
for line in sys.stdin:
x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, line.split()))
A, B, C, P = (x1, y1), (x2, y2), (x3, y3), (xp, yp)
if isleft(*A, *B, *P) == isleft(*B, *C, *P) == isleft(*C, *A, *P):
print("YES")
else:
print("NO") | ||
s638306525 | p00012 | u498511622 | 1502063096 | Python | Python3 | py | Runtime Error | 0 | 0 | 124 | while True:
x1,y1,x2,y2,x3,y3,xp,yp=map(float,input().split())
if xp<0 or yp<0:
print('No')
else:
print('Yes') | Traceback (most recent call last):
File "/tmp/tmphoabfwb9/tmpd2v0u1yf.py", line 2, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=map(float,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s090266901 | p00012 | u846136461 | 1513854337 | Python | Python | py | Runtime Error | 0 | 0 | 1054 | # coding: utf-8
def linecheck(x1, y1, x2, y2, xp, yp):
if yp - y1 > (xp - x1) * (y2 - y1) / (x2 - x1):
return 1
elif yp - y1 < (xp - x1) * (y2 - y1) / (x2 - x1):
return -1
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
if x1 == x2:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
elif x2 == x3:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp)
elif x3 == x1:
if (x1 < xp and xp < x2) or (x1 > xp and xp > x2):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
else:
judge = linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
if judge > 0:
print("YES")
elif judge < 0:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmp9oty7_wl/tmpaf1u7vn4.py", line 11, in <module>
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s217238355 | p00012 | u846136461 | 1513854494 | Python | Python | py | Runtime Error | 0 | 0 | 1051 | # coding: utf-8
def linecheck(x1, y1, x2, y2, xp, yp):
if yp - y1 > (xp - x1) * (y2 - y1) / (x2 - x1):
return 1
elif yp - y1 < (xp - x1) * (y2 - y1) / (x2 - x1):
return -1
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
if x1 == x2:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
elif x2 == x3:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp)
elif x3 == x1:
if (x1 < xp and xp < x2) or (x1 > xp and xp > x2):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
else:
judge = linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
if judge > 0:
print("YES")
elif judge < 0:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmphqvrwmnr/tmpfh3vqp5q.py", line 11, in <module>
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s014929142 | p00012 | u846136461 | 1513854779 | Python | Python | py | Runtime Error | 0 | 0 | 1037 | def linecheck(x1, y1, x2, y2, xp, yp):
if yp - y1 > (xp - x1) * (y2 - y1) / (x2 - x1):
return 1
elif yp - y1 < (xp - x1) * (y2 - y1) / (x2 - x1):
return -1
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
if x1 == x2:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
elif x2 == x3:
if (x1 < xp and xp < x3) or (x1 > xp and xp > x3):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp)
elif x3 == x1:
if (x1 < xp and xp < x2) or (x1 > xp and xp > x2):
judge = -1
else:
judge = 1
judge *= linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
else:
judge = linecheck(x1, y1, x2, y2, xp, yp) * linecheck(x1, y1, x3, y3, xp, yp) * linecheck(x2, y2, x3, y3, xp, yp)
if judge > 0:
print("YES")
elif judge < 0:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmpabklkal4/tmpfoi8m2az.py", line 9, in <module>
x1, y1, x2, y2, x3, y3, xp, yp = map(float, raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s317999904 | p00012 | u764789069 | 1514996141 | Python | Python | py | Runtime Error | 0 | 0 | 595 | import numpy
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
AB=numpy.array([x2-x1,y2-y1])
AP=numpy.array([xp-x1,yp-y1])
BC=numpy.array([x3-x2,y3-y2])
BP=numpy.array([xp-x2,yp-y2])
CA=numpy.array([x1-x3,y1-y3])
CP=numpy.array([xp-x3,yp-y3])
if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
(numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
print "YES"
else:
print "NO"
except:
break
| File "/tmp/tmpc3sw3esl/tmptsri3cmz.py", line 14
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s279950012 | p00012 | u024715419 | 1515130480 | Python | Python3 | py | Runtime Error | 0 | 0 | 417 | import numpy
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
s1 = (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1)
s2 = (x3-x2)*(yp-y2) - (y3-y2)*(xp-x2)
s3 = (x1-x3)*(yp-y3) - (y1-y3)*(xp-x3)
if numpy.sign(s1) == numpy.sign(s2) and numpy.sign(s1) == numpy.sign(s3):
print("YES")
else:
print("NO")
except:
break
| ||
s437718869 | p00012 | u024715419 | 1515130509 | Python | Python3 | py | Runtime Error | 0 | 0 | 417 | import numpy
while True:
try:
x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
s1 = (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1)
s2 = (x3-x2)*(yp-y2) - (y3-y2)*(xp-x2)
s3 = (x1-x3)*(yp-y3) - (y1-y3)*(xp-x3)
if numpy.sign(s1) == numpy.sign(s2) and numpy.sign(s1) == numpy.sign(s3):
print("YES")
else:
print("NO")
except:
break
| ||
s428566192 | p00012 | u764789069 | 1515222470 | Python | Python | py | Runtime Error | 0 | 0 | 628 | import numpy
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
AB=numpy.array([x2-x1,y2-y1])
AP=numpy.array([xp-x1,yp-y1])
BC=numpy.array([x3-x2,y3-y2])
BP=numpy.array([xp-x2,yp-y2])
CA=numpy.array([x1-x3,y1-y3])
CP=numpy.array([xp-x3,yp-y3])
#print numpy.cross(AB,AP)
if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
(numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
print "YES"
else:
print "NO"
except:
break
| File "/tmp/tmpjkptxkli/tmpluby21_4.py", line 14
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s478156995 | p00012 | u764789069 | 1515222876 | Python | Python | py | Runtime Error | 0 | 0 | 628 | import numpy
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
AB=numpy.array([x2-x1,y2-y1])
AP=numpy.array([xp-x1,yp-y1])
BC=numpy.array([x3-x2,y3-y2])
BP=numpy.array([xp-x2,yp-y2])
CA=numpy.array([x1-x3,y1-y3])
CP=numpy.array([xp-x3,yp-y3])
#print numpy.cross(AB,AP)
if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
(numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
print 'YES'
else:
print 'NO'
except:
break
| File "/tmp/tmpv8nmv4hb/tmpz3u00lbh.py", line 14
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s073071617 | p00012 | u150984829 | 1516787593 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | import sys
for e in sys.stdin:
p,q,r,s,t,u,x,y=map(float,e.split())
a=((x-p)*(u-q)-(y-q)*(t-p))/((r-p)*(u-q)-(s-q)*(t-p))
b=(x-p-a*(r-p))/(t-p)
print(['No','Yes'][0<a<1-b and 0<b<1-a])
| ||
s901967145 | p00012 | u150984829 | 1516787728 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | import sys
for e in sys.stdin:
p,q,r,s,t,u,x,y=map(float,e.split())
a=((x-p)*(u-q)-(y-q)*(t-p))/((r-p)*(u-q)-(s-q)*(t-p))
b=(x-p-a*(r-p))/(t-p)
print(['NO','YES'][0<a<1-b and 0<b<1-a])
| ||
s540392412 | p00012 | u069727578 | 1520048687 | Python | Python3 | py | Runtime Error | 0 | 0 | 326 | while 1:
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
d_max=max((x2-x1)**2+(y2-y1)**2,(x3-x2)**2+(y3-y2)**2,(x3-x1)**2+(y3-y1)**2)
d1,d2,d3=(x2-x1)**2+(y2-y1)**2,(x3-x2)**2+(y3-y2)**2,(x3-x1)**2+(y3-y1)**2;
if max(d_max,d1,d2,d3) > d_max:
print("No")
else:
print("Yes")
| Traceback (most recent call last):
File "/tmp/tmpdgv9vqx4/tmpjzj9grwt.py", line 2, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s649009155 | p00012 | u069727578 | 1520728591 | Python | Python3 | py | Runtime Error | 0 | 0 | 689 |
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0]=>0 and res[1]=>0 and res[0]+res[1]<1:
print("YES")
else:
print("NO")
| File "/tmp/tmp33vl6mpp/tmpumavyoai.py", line 23
if res[0]=>0 and res[1]=>0 and res[0]+res[1]<1:
^
SyntaxError: invalid syntax
| |
s503808220 | p00012 | u069727578 | 1520820568 | Python | Python3 | py | Runtime Error | 0 | 0 | 780 | while(true):
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
print("YES")
else:
print("NO")
| Traceback (most recent call last):
File "/tmp/tmpihyzj5cv/tmp6dyjckek.py", line 1, in <module>
while(true):
^^^^
NameError: name 'true' is not defined. Did you mean: 'True'?
| |
s920274659 | p00012 | u069727578 | 1520820606 | Python | Python3 | py | Runtime Error | 0 | 0 | 780 | while(True):
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
print("YES")
else:
print("NO")
| Traceback (most recent call last):
File "/tmp/tmpxavuon4h/tmp9ltea57r.py", line 3, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s581318147 | p00012 | u069727578 | 1520820662 | Python | Python3 | py | Runtime Error | 0 | 0 | 780 | while(True):
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
print("YES")
else:
print("NO")
| Traceback (most recent call last):
File "/tmp/tmpxdof2k35/tmpdlkwx_0u.py", line 3, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s072074434 | p00012 | u069727578 | 1520820843 | Python | Python3 | py | Runtime Error | 0 | 0 | 783 | while(True):
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0] >=0 and res[1] >=0 and (res[0]+res[1])<=1:
print("YES")
else:
print("NO")
| Traceback (most recent call last):
File "/tmp/tmpkqvhyqd6/tmpmju_is_g.py", line 3, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s761608732 | p00012 | u069727578 | 1520820956 | Python | Python3 | py | Runtime Error | 0 | 0 | 783 | while(True):
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;
def renritu(p,q,r,s,t,u): # renritu(p,q,r,s,t,u) px + qy = r sx+ty=u
a=p; b=q; c=r; d=s; e=t; f=u;
a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
res_y=b1-e1;
if res_y != 0 :
res_y =(c1-f1)/res_y;
res_x =(c-b*res_y)/a;
return(res_x,res_y)
else:
return(-1,-1)
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0] >=0 and res[1] >=0 and (res[0]+res[1])<=1:
print('YES')
else:
print('NO')
| Traceback (most recent call last):
File "/tmp/tmpcrpsu27r/tmp1550aozv.py", line 3, in <module>
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s484249181 | p00012 | u166871988 | 1523707198 | Python | Python3 | py | Runtime Error | 0 | 0 | 451 | import math
lm=lambda x,y,xa,ya,xb,yb:abs((yb-ya)/(xb-xa)*xa+xa - y + (yb-ya)/(xb-xa)*x) / math.hypot((yb-ya)/(xb-xa),-1) if (xb-xa)!=0 else abs(x-xb)
while True:
r=input()
if r=="":break
x1,y1,x2,y2,x3,y3,xp,yp=[float(i) for i in r.split()]
if lm(x1,y1,x2,y2,x3,y3)<lm(xp,yp,x2,y2,x3,y3) or lm(x2,y2,x1,y1,x3,y3)<lm(xp,yp,x1,y1,x3,y3) or lm(x3,y3,x1,y1,x2,y2)<lm(xp,yp,x1,y1,x2,y2):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmp9pdl2gys/tmpw9s0jnee.py", line 4, in <module>
r=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s938699628 | p00012 | u166871988 | 1523707250 | Python | Python3 | py | Runtime Error | 0 | 0 | 451 | import math
lm=lambda x,y,xa,ya,xb,yb:abs((yb-ya)/(xb-xa)*xa+xa - y + (yb-ya)/(xb-xa)*x) / math.hypot((yb-ya)/(xb-xa),-1) if (xb-xa)!=0 else abs(x-xb)
while True:
r=input()
if r=="":break
x1,y1,x2,y2,x3,y3,xp,yp=[float(i) for i in r.split()]
if lm(x1,y1,x2,y2,x3,y3)<lm(xp,yp,x2,y2,x3,y3) or lm(x2,y2,x1,y1,x3,y3)<lm(xp,yp,x1,y1,x3,y3) or lm(x3,y3,x1,y1,x2,y2)<lm(xp,yp,x1,y1,x2,y2):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmpccbarzhv/tmp3mcsyglu.py", line 4, in <module>
r=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s051582293 | p00012 | u166871988 | 1523707829 | Python | Python3 | py | Runtime Error | 0 | 0 | 489 | import math
def lm(x,y,xa,ya,xb,yb):
if (xb-xa)==0:return abs(x-xb)
d=(yb-ya)/(xb-xa)
return abs(d*xa+xa - y + d*x) / math.hypot(d,-1)
while True:
r=input()
if r=="":break
x1,y1,x2,y2,x3,y3,xp,yp=[float(i) for i in r.split()]
a=bool(lm(x1,y1,x2,y2,x3,y3)<lm(xp,yp,x2,y2,x3,y3))
b=bool(lm(x2,y2,x1,y1,x3,y3)<lm(xp,yp,x1,y1,x3,y3))
c=bool(lm(x3,y3,x1,y1,x2,y2)<lm(xp,yp,x1,y1,x2,y2))
if a or b or c:
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmpb5_cczdu/tmpt2c9p_7e.py", line 7, in <module>
r=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s969556574 | p00012 | u166871988 | 1523709772 | Python | Python3 | py | Runtime Error | 0 | 0 | 477 | g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])
while True:
l=[float(i) for i in input().split()]
if not l:break
ba=[l[0]-l[2],l[1]-l[3]]
ab=[-i for i in ba]
cb=[l[2]-l[4],l[3]-l[5]]
bc=[-i for i in cb]
ca=[l[0]-l[4],l[1]-l[5]]
ac=[-i for i in ca]
ap=[l[6]-l[0],l[7]-l[1]]
bp=[l[6]-l[2],l[7]-l[3]]
cp=[l[6]-l[4],l[7]-l[5]]
if g(ab,ac)<g(ab,ap) or g(ba,bc)<g(ba,bp) or g(ca,cb)<g(ca,cp):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmpse32bgqf/tmpdzde16ty.py", line 4, in <module>
l=[float(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s834071131 | p00012 | u166871988 | 1523709804 | Python | Python3 | py | Runtime Error | 0 | 0 | 485 | g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])
while True:
t=input()
if t=="":break
l=[float(i) for i in t.split()]
ba=[l[0]-l[2],l[1]-l[3]]
ab=[-i for i in ba]
cb=[l[2]-l[4],l[3]-l[5]]
bc=[-i for i in cb]
ca=[l[0]-l[4],l[1]-l[5]]
ac=[-i for i in ca]
ap=[l[6]-l[0],l[7]-l[1]]
bp=[l[6]-l[2],l[7]-l[3]]
cp=[l[6]-l[4],l[7]-l[5]]
if g(ab,ac)<g(ab,ap) or g(ba,bc)<g(ba,bp) or g(ca,cb)<g(ca,cp):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmp016ub8bh/tmpo550umn1.py", line 4, in <module>
t=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s600517701 | p00012 | u166871988 | 1523709868 | Python | Python3 | py | Runtime Error | 0 | 0 | 464 | g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])
while True:
t=input()
if t=="":break
l=[float(i) for i in t.split()]
ba=[l[0]-l[2],l[1]-l[3]]
ab=[-i for i in ba]
cb=[l[2]-l[4],l[3]-l[5]]
bc=[-i for i in cb]
ca=[l[0]-l[4],l[1]-l[5]]
ac=[-i for i in ca]
ap=[l[6]-l[0],l[7]-l[1]]
bp=[l[6]-l[2],l[7]-l[3]]
cp=[l[6]-l[4],l[7]-l[5]]
if g(ab,ac)<g(ab,ap) or g(ba,bc)<g(ba,bp):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmprxvvrx4y/tmpkwg7qrm_.py", line 4, in <module>
t=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s736066125 | p00012 | u166871988 | 1523709875 | Python | Python3 | py | Runtime Error | 0 | 0 | 427 | g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])
while True:
t=input()
if t=="":break
l=[float(i) for i in t.split()]
ba=[l[0]-l[2],l[1]-l[3]]
ab=[-i for i in ba]
cb=[l[2]-l[4],l[3]-l[5]]
bc=[-i for i in cb]
ca=[l[0]-l[4],l[1]-l[5]]
ac=[-i for i in ca]
ap=[l[6]-l[0],l[7]-l[1]]
bp=[l[6]-l[2],l[7]-l[3]]
cp=[l[6]-l[4],l[7]-l[5]]
if 0:
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmpv001mq7m/tmpk15mbe8_.py", line 4, in <module>
t=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s744238328 | p00012 | u166871988 | 1523709936 | Python | Python3 | py | Runtime Error | 0 | 0 | 494 | g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])
while True:
t=input()
if t=="":
break
l=[float(i) for i in t.split()]
ba=[l[0]-l[2],l[1]-l[3]]
ab=[-i for i in ba]
cb=[l[2]-l[4],l[3]-l[5]]
bc=[-i for i in cb]
ca=[l[0]-l[4],l[1]-l[5]]
ac=[-i for i in ca]
ap=[l[6]-l[0],l[7]-l[1]]
bp=[l[6]-l[2],l[7]-l[3]]
cp=[l[6]-l[4],l[7]-l[5]]
if g(ab,ac)<g(ab,ap) or g(ba,bc)<g(ba,bp) or g(ca,cb)<g(ca,cp):
print("NO")
else:
print("YES")
| Traceback (most recent call last):
File "/tmp/tmpvn1m0g3u/tmpzwssloew.py", line 4, in <module>
t=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s578061499 | p00012 | u719737030 | 1351003214 | Python | Python | py | Runtime Error | 0 | 5012 | 409 | import sys
def cross(a,b,p):
return ((b[0]-a[0])*(p[1]-a[1])) - ((p[0]-a[0])*(b[1]-a[1]))
for i in sys.stdin.readlines():
l = [float(x) for x in i.split()]
a,b,c,p = [l[:2],l[2:4],l[4:6],l[6:]]
if cross(a,b,p)<=0 and cross(b,c,p)<=0 and cross(c,a,p)<=0 :
print "YES"
elif cross(a,b,p)>=0 and cross(b,c,p)>=0 and cross(c,a,p)>=0 :
print "YES"
else:
print "N0" | File "/tmp/tmpj1chiiox/tmp6ed_w9wd.py", line 11
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s670284173 | p00012 | u719737030 | 1351003459 | Python | Python | py | Runtime Error | 0 | 5012 | 397 | import sys
def cross(a,b,p):
return ((b[0]-a[0])*(p[1]-a[1])) - ((p[0]-a[0])*(b[1]-a[1]))
for i in sys.stdin:
l = [float(x) for x in i.split()]
a,b,c,p = [l[:2],l[2:4],l[4:6],l[6:]]
if cross(a,b,p)<=0 and cross(b,c,p)<=0 and cross(c,a,p)<=0 :
print "YES"
elif cross(a,b,p)>=0 and cross(b,c,p)>=0 and cross(c,a,p)>=0 :
print "YES"
else:
print "N0" | File "/tmp/tmpv52_5b86/tmpmv8rz_m9.py", line 11
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s772048376 | p00012 | u759949288 | 1351585335 | Python | Python | py | Runtime Error | 0 | 11000 | 667 | import sys
def cross(a, b):
return (a.conjugate() * b).real
def dot(a, b):
return (a.conjugate() * b).imag
def ccw(a, b, c):
x = b - a
y = c - a;
if cross(x, y) > 0: return 1
if cross(x, y) < 0: return -1
if dot(x, y) < 0: return 2
if abs(x) < abs(y): return -2
return 0
def solve(l, p):
x = ccw(l[0][0], l[0][1], p)
x = int(x / abs(x))
for i in l[1:]:
y = ccw(i[0], i[1], p)
y = int(y / abs(y))
if x != y:
print "NO"
return
print 'YES'
for line in sys.stdin:
ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
a = complex(ax, ay)
b = complex(bx, by)
c = complex(cx, cy)
p = complex(px, py)
solve([(a, b), (b, c), (c, a)], p) | File "/tmp/tmpvmp9zf8_/tmplk_itsbt.py", line 24
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s953870444 | p00012 | u759949288 | 1351585364 | Python | Python | py | Runtime Error | 0 | 11000 | 667 | import sys
def cross(a, b):
return (a.conjugate() * b).real
def dot(a, b):
return (a.conjugate() * b).imag
def ccw(a, b, c):
x = b - a
y = c - a;
if cross(x, y) > 0: return 1
if cross(x, y) < 0: return -1
if dot(x, y) < 0: return 2
if abs(x) < abs(y): return -2
return 0
def solve(l, p):
x = ccw(l[0][0], l[0][1], p)
x = int(x / abs(x))
for i in l[1:]:
y = ccw(i[0], i[1], p)
y = int(y / abs(y))
if x != y:
print "NO"
return
print 'YES'
for line in sys.stdin:
ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
a = complex(ax, ay)
b = complex(bx, by)
c = complex(cx, cy)
p = complex(px, py)
solve([(a, b), (b, c), (c, a)], p) | File "/tmp/tmp9dvufn9y/tmpwe7oi5cl.py", line 24
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s114968465 | p00012 | u759949288 | 1351585457 | Python | Python | py | Runtime Error | 0 | 11000 | 694 | import sys
def cross(a, b):
return (a.conjugate() * b).real
def dot(a, b):
return (a.conjugate() * b).imag
def ccw(a, b, c):
x = b - a
y = c - a;
if cross(x, y) > 0: return 1
if cross(x, y) < 0: return -1
if dot(x, y) < 0: return 2
if abs(x) < abs(y): return -2
return 0
def solve(l, p):
x = ccw(l[0][0], l[0][1], p)
if x != 0:
x = int(x / abs(x))
for i in l[1:]:
y = ccw(i[0], i[1], p)
if y != 0:
y = int(y / abs(y))
if x != y:
print "NO"
return
print 'YES'
for line in sys.stdin:
ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
a = complex(ax, ay)
b = complex(bx, by)
c = complex(cx, cy)
p = complex(px, py)
solve([(a, b), (b, c), (c, a)], p) | File "/tmp/tmpjc65dqml/tmpf6qbv9ml.py", line 26
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s012715801 | p00012 | u647766105 | 1351608885 | Python | Python | py | Runtime Error | 0 | 0 | 490 | import sys
for line in sys.stdin:
list=map(float,line.split())
x=list[0:6:2]
y=list[1:6:2]
xp=list[6]
yp=list[7]
xv=[x[a%3]-x[(a+1)%3] for a in xrange(4)]
yv=[y[a%3]-y[(a+1)%3] for a in xrange(4)]
xpv=[xp-x[a] for a in xrange(3)]
ypv=[yp-y[a] for a in xrange(3)]
cross=[xv[i]*ypv[i]-yv[i]*xpv[i] for i in xrange(3)]
sorted(cross)
if (cross[2]>0 and cross[0]>0) or (cross[2]<0 and cross[0]<0):
print "YES"
else:
print "NO" | File "/tmp/tmp9h14g_g5/tmpxd_xedby.py", line 15
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s079557232 | p00012 | u647766105 | 1351609131 | Python | Python | py | Runtime Error | 0 | 0 | 502 | import sys
for line in sys.stdin.readlines():
list=map(float,line.split())
x=list[0:6:2]
y=list[1:6:2]
xp=list[6]
yp=list[7]
xv=[x[a%3]-x[(a+1)%3] for a in xrange(4)]
yv=[y[a%3]-y[(a+1)%3] for a in xrange(4)]
xpv=[xp-x[a] for a in xrange(3)]
ypv=[yp-y[a] for a in xrange(3)]
cross=[xv[i]*ypv[i]-yv[i]*xpv[i] for i in xrange(3)]
sorted(cross)
if (cross[2]>0 and cross[0]>0) or (cross[2]<0 and cross[0]<0):
print "YES"
else:
print "NO" | File "/tmp/tmpi8rg5_w5/tmprld6250k.py", line 15
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s055599028 | p00012 | u647766105 | 1351609262 | Python | Python | py | Runtime Error | 0 | 0 | 505 | import sys
for line in sys.stdin.readlines():
list=map(float,line.split(" "))
x=list[0:6:2]
y=list[1:6:2]
xp=list[6]
yp=list[7]
xv=[x[a%3]-x[(a+1)%3] for a in xrange(4)]
yv=[y[a%3]-y[(a+1)%3] for a in xrange(4)]
xpv=[xp-x[a] for a in xrange(3)]
ypv=[yp-y[a] for a in xrange(3)]
cross=[xv[i]*ypv[i]-yv[i]*xpv[i] for i in xrange(3)]
sorted(cross)
if (cross[2]>0 and cross[0]>0) or (cross[2]<0 and cross[0]<0):
print "YES"
else:
print "NO" | File "/tmp/tmp_ix8yqc1/tmpc2xv9dhp.py", line 15
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s035982193 | p00012 | u719737030 | 1351670113 | Python | Python | py | Runtime Error | 0 | 4948 | 397 | import sys
def cross(a,b,p):
return ((b[0]-a[0])*(p[1]-a[1])) - ((p[0]-a[0])*(b[1]-a[1]))
for i in sys.stdin:
l = [float(x) for x in i.split()]
a,b,c,p = [l[:2],l[2:4],l[4:6],l[6:]]
if cross(a,b,p)<=0 and cross(b,c,p)<=0 and cross(c,a,p)<=0 :
print "YES"
elif cross(a,b,p)>=0 and cross(b,c,p)>=0 and cross(c,a,p)>=0 :
print "YES"
else:
print "N0" | File "/tmp/tmp5ach5rrr/tmpr31iu336.py", line 11
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s869722286 | p00012 | u779627195 | 1352480176 | Python | Python | py | Runtime Error | 0 | 1612 | 1091 | #coding: utf-8
def isInOut(p, q, s, c, z):
if (p*c[0] + q*c[1] - s)*(p*z[0] + q*z[1] - s) > 0:
return True
else:
return False
while 1:
try:
x = [0 for i in xrange(3)]
y = [0 for i in xrange(3)]
c = [0 for i in xrange(2)]
z = [0 for i in xrange(2)]
a,b,t = [[0 for i in xrange(2)] for i in xrange(3)]
p,q,s = [[0 for i in xrange(3)] for i in xrange(3)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
c = [sum(x)/3, sum(y)/3]
for j in xrange(3):
if x[j] == x[j-1]:
p[j] = 1.
q[j] = 0.
s[j] = x[j]
else:
t[j] = (y[j] - y[j-1]) / (x[j] - x[j-1])
p[j] = t[j]
q[j] = -1.
s[j] = t[j]*x[j]-y[j]
#print p[j], q[j], s[j]
if isInOut(p[j], q[j], s[j], c, z) is False:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpoc6stb71/tmpz8xnqe49.py", line 31
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s690031725 | p00012 | u779627195 | 1352480386 | Python | Python | py | Runtime Error | 0 | 1612 | 1066 | #coding: utf-8
def isInOut(p, q, s, c, z):
if (p*c[0] + q*c[1] - s)*(p*z[0] + q*z[1] - s) > 0:
return True
else:
return False
while 1:
try:
x = [0 for i in xrange(3)]
y = [0 for i in xrange(3)]
c = [0 for i in xrange(2)]
z = [0 for i in xrange(2)]
t = [0 for i in xrange(3)]
p,q,s = [[0 for i in xrange(3)] for i in xrange(3)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
c = [sum(x)/3, sum(y)/3]
for j in xrange(3):
if x[j] == x[j-1]:
p[j] = 1.
q[j] = 0.
s[j] = x[j]
else:
t[j] = (y[j] - y[j-1]) / (x[j] - x[j-1])
p[j] = t[j]
q[j] = -1.
s[j] = t[j]*x[j]-y[j]
#print p[j], q[j], s[j]
if isInOut(p[j], q[j], s[j], c, z) is False:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpfreo2lf3/tmpqyq8eu91.py", line 31
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s819824163 | p00012 | u779627195 | 1352538562 | Python | Python | py | Runtime Error | 0 | 5372 | 916 | #coding: utf-8
def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x,y = [[0 for i in xrange(3)] for j in xrange(2)]
a = []
z = [0 for i in xrange(2)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmphvkzx0qr/tmp3c90_6ni.py", line 27
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s404757191 | p00012 | u779627195 | 1352538613 | Python | Python | py | Runtime Error | 0 | 5372 | 901 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x,y = [[0 for i in xrange(3)] for j in xrange(2)]
a = []
z = [0 for i in xrange(2)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpa6_1iffo/tmpla8onwt9.py", line 26
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s630839477 | p00012 | u779627195 | 1352539350 | Python | Python | py | Runtime Error | 0 | 5372 | 898 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x,y = [[0 for i in range(3)] for j in range(2)]
a = []
z = [0 for i in range(2)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmp18n82pba/tmp5d07zqhz.py", line 26
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s277764634 | p00012 | u779627195 | 1352541143 | Python | Python | py | Runtime Error | 0 | 5372 | 1038 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
def main():
while 1:
try:
x,y = [[0. for i in xrange(3)] for j in xrange(2)]
a = []
z = [0. for i in xrange(2)]
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, raw_input().split())
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break
if __name__ == '__main__':
main() | File "/tmp/tmpirstjq1k/tmp98ns7axr.py", line 27
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s905289987 | p00012 | u779627195 | 1352542048 | Python | Python | py | Runtime Error | 0 | 5372 | 878 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x1,y1,x2,y2,x3,y3 = (0,0,0,0,0,0)
a = []
xp,yp = (0,0)
x1,y1,x2,y2,x3,y3,xp,yp = map(float, raw_input().split())
a.append(x1+(y1)*1j)
a.append(x2+(y2)*1j)
a.append(x3+(y3)*1j)
c = (x1+x2+x3)/3+((y1+y2+y3)/3)*1j
p = xp+yp*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpl4aj_ypm/tmp0b5hjjal.py", line 27
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s198977166 | p00012 | u779627195 | 1352549671 | Python | Python | py | Runtime Error | 0 | 5440 | 936 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x,y = [[0. for i in xrange(3)] for j in xrange(2)]
a = []
xp,yp = (0,0)
line = raw_input().split()
if line == []: break
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, line)
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpvrnamk1w/tmp_vthewu8.py", line 28
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s015594002 | p00012 | u779627195 | 1352549740 | Python | Python | py | Runtime Error | 0 | 5440 | 932 | def dot(a, b):
return (a.real*b.real - a.imag*b.imag)
def cross(a, b):
return (a.real*b.imag - a.imag*b.real)
EPS = 10**(-7)
def isIntersectedLS(a1, a2, b1, b2):
return ((cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1)) < EPS and
(cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1)) < EPS)
while 1:
try:
x,y = [[0. for i in xrange(3)] for j in xrange(2)]
a = []
z = (0,0)
line = raw_input().split()
if line == []: break
x[0],y[0],x[1],y[1],x[2],y[2],z[0],z[1] = map(float, line)
for i in xrange(3):
a.append((x[i]+(y[i])*1j))
c = (sum(x)/3)+(sum(y)/3)*1j
p = z[0]+z[1]*1j
for i in xrange(3):
#print a, c, p
if isIntersectedLS(a[i-1], a[i], c, p) is True:
print "NO"
break
else:
print "YES"
except EOFError:
break | File "/tmp/tmpd5n9ywsc/tmpwub2_06b.py", line 28
print "NO"
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s647870759 | p00012 | u504990413 | 1353088421 | Python | Python | py | Runtime Error | 0 | 1012 | 788 | def heron(a,b,c):
s = 0.5*(a+b+c)
return (s*(s-a)*(s-b)*(s-c))**0.5
while True:
try:
x = map(float, raw_input().split(' '))
ab = ((x[0]-x[2])**2 +(x[1]-x[3])**2)**0.5
bc = ((x[2]-x[4])**2 +(x[3]-x[5])**2)**0.5
ca = ((x[4]-x[0])**2 +(x[5]-x[1])**2)**0.5
area_abc = heron(ab,bc,ca)
oa = ((x[0]-x[6])**2 +(x[1]-x[7])**2)**0.5
ob = ((x[2]-x[6])**2 +(x[3]-x[7])**2)**0.5
oc = ((x[4]-x[6])**2 +(x[5]-x[7])**2)**0.5
area_oab = heron(ab,oa,ob)
area_obc = heron(bc,ob,oc)
area_oca = heron(ca,oc,oa)
area_sum = area_oab+area_obc+area_oca
if round(area_abc,2) < round(area_sum,2):
print 'NO'
else:
print 'YES'
except EOFError:
break | File "/tmp/tmpox94vtkp/tmpjx__wqjf.py", line 25
print 'NO'
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s761217174 | p00012 | u504990413 | 1353088720 | Python | Python | py | Runtime Error | 0 | 1012 | 784 | def heron(a,b,c):
s = 0.5*(a+b+c)
return (s*(s-a)*(s-b)*(s-c))**0.5
while True:
try:
x = map(float, raw_input().split(' '))
ab = ((x[0]-x[2])**2 +(x[1]-x[3])**2)**0.5
bc = ((x[2]-x[4])**2 +(x[3]-x[5])**2)**0.5
ca = ((x[4]-x[0])**2 +(x[5]-x[1])**2)**0.5
area_abc = heron(ab,bc,ca)
oa = ((x[0]-x[6])**2 +(x[1]-x[7])**2)**0.5
ob = ((x[2]-x[6])**2 +(x[3]-x[7])**2)**0.5
oc = ((x[4]-x[6])**2 +(x[5]-x[7])**2)**0.5
area_oab = heron(ab,oa,ob)
area_obc = heron(bc,ob,oc)
area_oca = heron(ca,oc,oa)
area_sum = area_oab+area_obc+area_oca
if round(area_abc) < round(area_sum):
print 'NO'
else:
print 'YES'
except EOFError:
break | File "/tmp/tmpricgpui7/tmpuxj7iuzn.py", line 25
print 'NO'
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s645002114 | p00012 | u504990413 | 1353089975 | Python | Python | py | Runtime Error | 0 | 1012 | 788 | def heron(a,b,c):
s = 0.5*(a+b+c)
return (s*(s-a)*(s-b)*(s-c))**0.5
while True:
try:
x = map(float, raw_input().split(' '))
ab = ((x[0]-x[2])**2 +(x[1]-x[3])**2)**0.5
bc = ((x[2]-x[4])**2 +(x[3]-x[5])**2)**0.5
ca = ((x[4]-x[0])**2 +(x[5]-x[1])**2)**0.5
area_abc = heron(ab,bc,ca)
oa = ((x[0]-x[6])**2 +(x[1]-x[7])**2)**0.5
ob = ((x[2]-x[6])**2 +(x[3]-x[7])**2)**0.5
oc = ((x[4]-x[6])**2 +(x[5]-x[7])**2)**0.5
area_oab = heron(ab,oa,ob)
area_obc = heron(bc,ob,oc)
area_oca = heron(ca,oc,oa)
area_sum = area_oab+area_obc+area_oca
if round(area_abc,2) < round(area_sum,2):
print 'NO'
else:
print 'YES'
except EOFError:
break | File "/tmp/tmpg9xlr1yc/tmp7fxov3ls.py", line 25
print 'NO'
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s099534444 | p00012 | u504990413 | 1353665363 | Python | Python | py | Runtime Error | 0 | 1264 | 378 |
while True:
try:
x1,y1,x2,y2,x3,y3,px,py = map(float,raw_input().split(' '))
v1 = [x1-px,y1-py]
v2 = [x2-px,y2-py]
v3 = [x3-px,y3-py]
v12 =[v1[0]+v2[0],v1[1]+v2[1]]
if v12[0]*v3[0]+v12[1]*v3[1] < 0:
print 'YES'
else:
print 'NO'
except EOFError:
break | File "/tmp/tmp6eke1njz/tmpoi3fm2nn.py", line 13
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s968082055 | p00012 | u504990413 | 1353682591 | Python | Python | py | Runtime Error | 0 | 5048 | 379 | while True:
try:
x1,y1,x2,y2,x3,y3,px,py = map(float,raw_input().split(' '))
v1 = [x1-px,y1-py]
v2 = [x2-px,y2-py]
v3 = [x3-px,y3-py]
v12 =[v1[0]+v2[0],v1[1]+v2[1]]
if v12[0]*v3[0]+v12[1]*v3[1] < 0:
print 'YES'
else:
print 'NO'
except EOFError:
break | File "/tmp/tmpoei4pix4/tmp_7lorfp6.py", line 12
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s626502958 | p00012 | u504990413 | 1353716661 | Python | Python | py | Runtime Error | 0 | 1008 | 344 | while True:
try:
x1,y1,x2,y2,x3,y3,px,py = map(float,raw_input().split())
v1 = [x1-px,y1-py]
v2 = [x2-px,y2-py]
v3 = [x3-px,y3-py]
v12 =[v1[0]+v2[0],v1[1]+v2[1]]
if v12[0]*v3[0]+v12[1]*v3[1] < 0:
print 'YES'
else:
print 'NO'
except EOFError:
break | File "/tmp/tmpuagqofnk/tmp6gsy94kk.py", line 9
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s652883535 | p00012 | u126791750 | 1357120558 | Python | Python | py | Runtime Error | 0 | 0 | 406 | def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return 1
elif vec < 0:
return -1
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
except EOFError:
break
r = checker(x1,y1,x2,y2,xp,yp)
r += checker(x2, y2, x3, y3, xp, yp)
r += checker(x3, y3, x1, y1, xp, yp)
if r == 3 or r == -3:
print("YES")
else:
print("NO") | Traceback (most recent call last):
File "/tmp/tmppwh9y9hw/tmpk1sazxw4.py", line 10, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s952262433 | p00012 | u126791750 | 1357120618 | Python | Python | py | Runtime Error | 0 | 0 | 413 | def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return 1
elif vec < 0:
return -1
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = checker(x1,y1,x2,y2,xp,yp)
r += checker(x2, y2, x3, y3, xp, yp)
r += checker(x3, y3, x1, y1, xp, yp)
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmp7kcm69oe/tmp6qvump9q.py", line 10, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s981092847 | p00012 | u126791750 | 1357120909 | Python | Python | py | Runtime Error | 0 | 0 | 413 | def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return 1
elif vec < 0:
return -1
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = checker(x1,y1,x2,y2,xp,yp)
r += checker(x2, y2, x3, y3, xp, yp)
r += checker(x3, y3, x1, y1, xp, yp)
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmp6psqkxt1/tmp7fsyc6n8.py", line 10, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s089369479 | p00012 | u126791750 | 1357121059 | Python | Python | py | Runtime Error | 0 | 0 | 441 | global r
def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return 1
elif vec < 0:
return -1
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = 0
r = r + checker(x1,y1,x2,y2,xp,yp)
r = r + checker(x2, y2, x3, y3, xp, yp)
r = r + checker(x3, y3, x1, y1, xp, yp)
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmpvrauq__7/tmpsb6qw5ri.py", line 12, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s591932173 | p00012 | u126791750 | 1357121221 | Python | Python | py | Runtime Error | 0 | 0 | 472 | global r
def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return int(1)
elif vec < 0:
return int(-1)
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = 0
r += checker(x1,y1,x2,y2,xp,yp)
print r
r += checker(x2, y2, x3, y3, xp, yp)
print r
r += checker(x3, y3, x1, y1, xp, yp)
print r
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | File "/tmp/tmpvp262s19/tmpy757_q99.py", line 15
print r
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s015256381 | p00012 | u126791750 | 1357121355 | Python | Python | py | Runtime Error | 0 | 0 | 482 | global r
def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return int(1)
elif vec < 0:
return int(-1)
if __name__ == '__main__':
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = 0
r += checker(x1,y1,x2,y2,xp,yp)
r += checker(x2, y2, x3, y3, xp, yp)
r += checker(x3, y3, x1, y1, xp, yp)
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmpsnajsjk0/tmptnmusukd.py", line 13, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s319878761 | p00012 | u126791750 | 1357121586 | Python | Python | py | Runtime Error | 0 | 0 | 497 | global r
def checker(x1,y1,x2,y2,xp,yp):
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
return int(1)
elif vec < 0:
return int(-1)
if __name__ == '__main__':
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = 0
r += int(checker(x1,y1,x2,y2,xp,yp))
r += int(checker(x2, y2, x3, y3, xp, yp))
r += int(checker(x3, y3, x1, y1, xp, yp))
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmpy3kc3vbb/tmpc4pl8pwp.py", line 13, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s336716975 | p00012 | u126791750 | 1357122350 | Python | Python | py | Runtime Error | 0 | 0 | 500 | def checker(x1,y1,x2,y2,xp,yp):
r = 0
vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
if vec > 0:
r = 1
return r
elif vec < 0:
r = -1
return r
if __name__ == '__main__':
while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
r = 0
r += int(checker(x1,y1,x2,y2,xp,yp))
r += int(checker(x2, y2, x3, y3, xp, yp))
r += int(checker(x3, y3, x1, y1, xp, yp))
if r == 3 or r == -3:
print("YES")
else:
print("NO")
except EOFError:
break | Traceback (most recent call last):
File "/tmp/tmphxyv_v3v/tmpqy6v6xw9.py", line 14, in <module>
x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s921932213 | p00012 | u633068244 | 1393358654 | Python | Python | py | Runtime Error | 0 | 0 | 945 | while True:
try:
x1,y1,x2,y2,x3,y3,xp,yp = map(float, raw_input().split())
a = (x1-x2)**2+(y1-y2)**2
b = (x1-x3)**2+(y1-y3)**2
c = (x2-x3)**2+(y2-y3)**2
xa = (x3-xp)**2+(y3-yp)**2
xb = (x2-xp)**2+(y2-yp)**2
xc = (x1-xp)**2+(y1-yp)**2
cosa = (a-b+c)/(2*math.sqrt(b)*math.sqrt(c))
cosb = (b-a+c)/(2*math.sqrt(a)*math.sqrt(c))
cosc = (c-a+b)/(2*math.sqrt(a)*math.sqrt(b))
cos1 = (xc-xa+xc)/(2*math.sqrt(xa)*math.sqrt(b))
cos2 = (xa-c+xb)/(2*math.sqrt(xb)*math.sqrt(c))
cos3 = (xb-a+xc)/(2*math.sqrt(xc)*math.sqrt(a))
# cos4 = (a-b+c)/(2*math.sqrt(xa)*math.sqrt(c))
# cos5 = (a-b+c)/(2*math.sqrt(xb)*math.sqrt(a))
# cos6 = (a-b+c)/(2*math.sqrt(xc)*math.sqrt(b))
if cos1<cosa or cos2<cosb or cos3<cosc:
print "YES"
print "YES"
else:
print "NO"
except:
break | File "/tmp/tmp9zm2itk5/tmpcce8ensw.py", line 21
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s972301940 | p00013 | u506132575 | 1416116969 | Python | Python | py | Runtime Error | 0 | 0 | 152 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
lis = []
while True:
d = input()
if d == 0:
print lis[-1]
lis.pop()
else:
lis.append(d) | File "/tmp/tmpza5lswr8/tmpszxrb9rp.py", line 8
print lis[-1]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s738803340 | p00013 | u567380442 | 1422619995 | Python | Python3 | py | Runtime Error | 0 | 0 | 136 | import sys
cars = []
for line in sys.stdin:
car = int(line)
if car:
cars.append(num)
else:
print(cars.pop()) | ||
s294895272 | p00013 | u463990569 | 1452846960 | Python | Python3 | py | Runtime Error | 0 | 0 | 128 | garage = []
while True:
num = int(input())
if num == 0:
print(garage.pop())
else:
garage.append(num) | Traceback (most recent call last):
File "/tmp/tmpnuilcwrs/tmp1vmwkgrw.py", line 3, in <module>
num = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s181752995 | p00013 | u580607517 | 1453044249 | Python | Python | py | Runtime Error | 0 | 0 | 105 | rail = []
while True:
n = int(raw_input())
if n != 0:
rail.append(n)
else:
print rail.pop() | File "/tmp/tmp0123g3nh/tmpckxdqoi4.py", line 7
print rail.pop()
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s027542509 | p00013 | u744114948 | 1465016296 | Python | Python3 | py | Runtime Error | 0 | 0 | 107 | a = []
while True:
s = int(input())
if s != 0:
a.append(s)
else:
print(a.pop()) | Traceback (most recent call last):
File "/tmp/tmpd0_qq5ik/tmpebxq3ieu.py", line 3, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s238079270 | p00013 | u393305246 | 1474277562 | Python | Python | py | Runtime Error | 0 | 0 | 155 | list=[]
list.append(input())
While list!=[]:
inp=input()
if inp==0:
print list[-1]
del list[-1]
else:
list.append(inp) | File "/tmp/tmpq2y76vcx/tmpsavue99f.py", line 4
While list!=[]:
^^^^
SyntaxError: invalid syntax
| |
s769178291 | p00013 | u393305246 | 1474277719 | Python | Python | py | Runtime Error | 0 | 0 | 146 | lis=[]
lis.append(input())
while True:
inp=input()
if inp==0:
print lis[-1]
del lis[-1]
else:
lis.append(inp) | File "/tmp/tmp2rphvd5b/tmpov9jmuu3.py", line 7
print lis[-1]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s279322457 | p00013 | u393305246 | 1474277737 | Python | Python | py | Runtime Error | 0 | 0 | 146 | lis=[]
lis.append(input())
while true:
inp=input()
if inp==0:
print lis[-1]
del lis[-1]
else:
lis.append(inp) | File "/tmp/tmpgm67i1if/tmpndtsoezu.py", line 7
print lis[-1]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s221406126 | p00013 | u393305246 | 1474277849 | Python | Python | py | Runtime Error | 0 | 0 | 146 | lis=[]
lis.append(input())
while True:
inp=input()
if inp==0:
print lis[-1]
del lis[-1]
else:
lis.append(inp) | File "/tmp/tmprdk67vk8/tmpsxkm7gqo.py", line 7
print lis[-1]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s116051221 | p00013 | u252368621 | 1479003231 | Python | Python3 | py | Runtime Error | 0 | 0 | 152 | import sys
s=[input()]
while(True):
n=input()
if n=="0":
print(s.pop())
elif n=="":
sys.exit()
else:
s.append(n) | Traceback (most recent call last):
File "/tmp/tmpt7b4d1ee/tmpc0wb62ij.py", line 2, in <module>
s=[input()]
^^^^^^^
EOFError: EOF when reading a line
| |
s382675037 | p00013 | u252368621 | 1479003296 | Python | Python3 | py | Runtime Error | 0 | 0 | 162 | import sys
s=[int(input())]
while(True):
n=input()
if n=="0":
print(s.pop())
elif n=="":
sys.exit()
else:
s.append(int(n)) | Traceback (most recent call last):
File "/tmp/tmpi2pvp68y/tmp4dnxur9l.py", line 2, in <module>
s=[int(input())]
^^^^^^^
EOFError: EOF when reading a line
| |
s304095546 | p00013 | u205327055 | 1512997290 | Python | Python | py | Runtime Error | 0 | 0 | 214 | # coding:utf-8
syako = []
number = input()
while True:
if number != 0:
syako.append(number)
elif number == 0:
print syako.pop()
number = input()
if number == EOFError:
break | File "/tmp/tmpq8gd26fi/tmph9b537vf.py", line 9
print syako.pop()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s778374543 | p00013 | u203261375 | 1513428313 | Python | Python3 | py | Runtime Error | 0 | 0 | 178 | while True:
try:
n = int(input())
except:
break
arr = []
if n == 0:
print(arr[-1])
arr = arr[:-1]
else:
arr.append(n) | ||
s531654260 | p00013 | u724947062 | 1346959222 | Python | Python | py | Runtime Error | 0 | 1544 | 176 | import sys
cars = list()
for line in sys.stdin.readlines():
line = line.strip()
N = int(line)
if N != 0:
cars.append(N)
else:
print cars.pop() | File "/tmp/tmp8xzholx2/tmps6m5tt5j.py", line 11
print cars.pop()
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s752326855 | p00013 | u724947062 | 1346959332 | Python | Python | py | Runtime Error | 0 | 1544 | 176 | import sys
cars = list()
for line in sys.stdin.readlines():
line = line.strip()
N = int(line)
if N != 0:
cars.append(N)
else:
print cars.pop() | File "/tmp/tmptc03slch/tmptg9to9lj.py", line 11
print cars.pop()
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s667763218 | p00013 | u724947062 | 1346959398 | Python | Python | py | Runtime Error | 0 | 1544 | 177 | import sys
cars = list()
for line in sys.stdin.readlines():
line = line.strip()
N = int(line)
if N != 0:
cars.append(N)
else:
print(cars.pop()) | ||
s871888014 | p00013 | u724947062 | 1346959507 | Python | Python | py | Runtime Error | 0 | 1544 | 192 | import sys
cars = list()
for line in sys.stdin.readlines():
line = line.strip()
print line
N = int(line)
if N != 0:
cars.append(N)
else:
print(cars.pop()) | File "/tmp/tmprabg_j4j/tmpoj2nt000.py", line 7
print line
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s672251385 | p00013 | u724947062 | 1347284287 | Python | Python | py | Runtime Error | 0 | 5396 | 163 | import sys
stack = list()
for line in sys.stdin.readlines():
line = line.strip()
n = int(line)
if n == 0:
print stack.pop()
else:
stack.append(n) | File "/tmp/tmpui9hfp99/tmpaciw4fb1.py", line 9
print stack.pop()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s335271404 | p00013 | u724947062 | 1347284328 | Python | Python | py | Runtime Error | 0 | 5396 | 163 | import sys
stack = list()
for line in sys.stdin.readlines():
line = line.strip()
n = int(line)
if n == 0:
print stack.pop()
else:
stack.append(n) | File "/tmp/tmpzprzuiwt/tmp02ud7oom.py", line 9
print stack.pop()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s158627240 | p00013 | u017525488 | 1350107069 | Python | Python | py | Runtime Error | 0 | 752 | 138 | import sys
lst = []
for line in sys.stdin:
num = int(line)
if num == 0:
print lst.pop()
else:
lst.append(num) | File "/tmp/tmp8kcy49qr/tmph45t230i.py", line 7
print lst.pop()
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s105079859 | p00013 | u017525488 | 1350107149 | Python | Python | py | Runtime Error | 0 | 752 | 138 | import sys
lst = []
for line in sys.stdin:
num = int(line)
if num == 0:
print lst.pop()
else:
lst.append(num) | File "/tmp/tmpshrw3w0z/tmpc470x1wm.py", line 7
print lst.pop()
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s627778925 | p00013 | u017525488 | 1350107242 | Python | Python | py | Runtime Error | 0 | 752 | 158 | import sys
lst = []
for line in sys.stdin:
num = int(line.split())
if num == 0:
print lst.pop()
else:
lst.append(num)
sys.exit(0) | File "/tmp/tmp2y4ulzhk/tmp9evau_tm.py", line 7
print lst.pop()
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s248530839 | p00013 | u017525488 | 1350107945 | Python | Python | py | Runtime Error | 0 | 752 | 146 | import sys
lst = []
for line in sys.stdin:
num = int(line.strip())
if num == 0:
print lst.pop()
else:
lst.append(num) | File "/tmp/tmp5rw1ecyo/tmpahqvgevv.py", line 7
print lst.pop()
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s986480804 | p00013 | u719737030 | 1351124487 | Python | Python | py | Runtime Error | 0 | 0 | 133 | import sys
list=[]
for i in sys.stdin.readlines():
if int(i) != 0:
list.append(int(i))
else:
print list.pop() | File "/tmp/tmpnibkl_t3/tmp623whizl.py", line 7
print list.pop()
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s478791522 | p00013 | u719737030 | 1351124720 | Python | Python | py | Runtime Error | 0 | 0 | 142 | import sys
list=[]
for i in sys.stdin.readlines():
if float(i) != 0:
list.append(float(i))
else:
print int(list.pop()) | File "/tmp/tmp6krcd4a5/tmpcj6wgv42.py", line 7
print int(list.pop())
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s174292492 | p00013 | u647766105 | 1351609388 | Python | Python | py | Runtime Error | 0 | 0 | 127 | import sys
stack=[]
for i in sys.stdin:
a=int(i)
if a >0 :
stack.append(a)
else :
print stack.pop() | File "/tmp/tmpm8htl2yv/tmpp96tiylk.py", line 8
print stack.pop()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s551204634 | p00013 | u647766105 | 1351609968 | Python | Python | py | Runtime Error | 0 | 0 | 166 | # -*- coding: utf-8 -*-
import sys
stack=[]
for i in sys.stdin:
a=int(i.split('\n')[0])
if a >0 :
stack.append(a)
else :
print stack.pop() | File "/tmp/tmpjedf5n87/tmpkopdqv6o.py", line 9
print stack.pop()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s815866707 | p00013 | u779627195 | 1352545469 | Python | Python | py | Runtime Error | 0 | 5372 | 177 | tracks = []
while 1:
try:
c = input()
if c == 0:
print tracks.pop()
else:
tracks.append(c)
except EOFError:
break | File "/tmp/tmpczg8_x6m/tmprf9_6ucw.py", line 6
print tracks.pop()
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s417411829 | p00013 | u779627195 | 1352546207 | Python | Python | py | Runtime Error | 0 | 5440 | 177 | tracks = []
while 1:
try:
c = input()
if c == 0:
print tracks.pop()
else:
tracks.append(c)
except EOFError:
break | File "/tmp/tmppdl5rb3g/tmp5wwwbhmx.py", line 6
print tracks.pop()
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s314927296 | p00013 | u779627195 | 1352549064 | Python | Python | py | Runtime Error | 0 | 5440 | 186 | tracks = []
while 1:
try:
c = int(raw_input())
if c == 0:
print tracks.pop()
else:
tracks.append(c)
except EOFError:
break | File "/tmp/tmpfinywys4/tmpjwgb48rl.py", line 6
print tracks.pop()
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.