結果
| 問題 |
No.622 点と三角柱の内外判定
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-22 21:21:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 403 bytes |
| コンパイル時間 | 323 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 46,816 KB |
| 最終ジャッジ日時 | 2024-12-17 23:22:08 |
| 合計ジャッジ時間 | 19,794 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 9 |
ソースコード
#!/usr/bin/env python
import numpy as np
A = np.array([int(x) for x in input().split()])
B = np.array([int(x) for x in input().split()])
C = np.array([int(x) for x in input().split()])
D = np.array([int(x) for x in input().split()])
AB = B-A
AC = C-A
AD = D-A
Z = np.cross(AB, AC)
M = np.matrix([AB, AC, Z]).I
Co = AD * M
if Co[0, 0] <= 1 and Co[0, 1] <= 1:
print('YES')
else:
print('NO')