結果
| 問題 |
No.622 点と三角柱の内外判定
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-03 13:07:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 475 bytes |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 44,724 KB |
| 最終ジャッジ日時 | 2024-09-18 21:41:08 |
| 合計ジャッジ時間 | 18,423 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 11 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
data = np.array(read().split(), np.int64)
A,B,C,D = [data[3*i:3*i+3] for i in range(4)]
def test(A,B,C,D):
v = np.cross(B-A, C-A)
n = np.cross(B-A, v)
return np.sign(np.dot(n,C-A)) == np.sign(np.dot(n,D-A))
bl = True
for _ in range(3):
A,B,C = B,C,A
bl &= test(A,B,C,D)
answer = 'YES' if bl else 'NO'
print(answer)
maspy