結果
問題 |
No.2628 Shrinkage
|
ユーザー |
![]() |
提出日時 | 2024-02-16 21:41:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 353 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-28 19:55:39 |
合計ジャッジ時間 | 1,572 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 27 |
ソースコード
def p(a,b,c,d): return (a-c)**2+(b-d)**2 def q(a,b,c,d,e,f,g,h): return (a-c)*(f-h)!=(b-d)*(e-g) for _ in range(int(input())): a,b,c,d,e,f,g,h = map(int,input().split()) i = p(a,b,e,f)==p(c,d,g,h) j = p(a,b,c,d)>p(e,f,g,h) k = q(a,b,e,f,c,d,g,h) and (q(a,b,c,d,a,b,e,f) or q(c,d,a,b,c,d,g,h)) print("Yes" if i and (j or k) else "No")