用户输出
Yes
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#2464 | #1003. 凸多边形 | Accepted | 100 | 987 ms | 2964 K | Python 3 / 782 B | t330034013 | 2023-11-18 10:21:52 |
def opposit(a, b, x, y):
if a[0] != b[0]:
k = (a[1] - b[1])/(a[0] - b[0])
b = a[1] - k * a[0]
if k * x + b < y :
return False # 点在上方
else:
return True # 点在下方
else:
verticalline = a[0]
if x > verticalline:
return False # 点在右方
else:
return True # 点在左方
point = []
for i in range(4):
point.append(list(map(int, input().split())))
if opposit(point[0], point[2], point[1][0], point[1][1]) == opposit(point[0], point[2], point[3][0], point[3][1]):
print('No')
elif opposit(point[1], point[3], point[0][0], point[0][1]) == opposit(point[1], point[3], point[2][0], point[2][1]):
print('No')
else:
print('Yes')
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
Yes
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0
用户输出
No
系统信息
Exited with return code 0