結果
| 問題 |
No.3005 トレミーの問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-17 22:06:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 481 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 82,464 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2025-01-17 22:06:48 |
| 合計ジャッジ時間 | 2,680 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
ax,ay = map(int,input().split())
bx,by = map(int,input().split())
cx,cy = map(int,input().split())
dx,dy = map(int,input().split())
a = complex(ax,ay)
b = complex(bx,by)
c = complex(cx,cy)
d = complex(dx,dy)
ans = ((a-c)*(b-d))/((a-d)*(b-c))
ans1 = (a-c)/(b-c)
ans2 = (a-d)/(b-d)
# print(ans)
# print(ans1)
# print(ans2)
if (abs(ans.imag) >= 0.000000000000001) or (abs(ans1.imag) <= 0.000000000000001 and abs(ans2.imag) <= 0.000000000000001):
print("NO")
else:
print("YES")