結果
| 問題 | No.2628 Shrinkage | 
| コンテスト | |
| ユーザー |  ニックネーム | 
| 提出日時 | 2024-02-16 23:45:57 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 453 bytes | 
| コンパイル時間 | 299 ms | 
| コンパイル使用メモリ | 12,800 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-09-28 22:48:45 | 
| 合計ジャッジ時間 | 1,974 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 WA * 16 RE * 6 | 
ソースコード
for _ in range(int(input())):
    a,b,c,d,e,f,g,h = map(int,input().split())
    i,j,k,l = e-a,f-b,g-c,h-d
    if (a,b,c,d)==(e,f,g,h): print("Yes"); continue
    if (a,b)==(e,f) or (c,d)==(g,h) or i*l==j*k: print("No"); continue
    m = a+(l*(c-a)-k*(d-b))/(i*l-j*k)*i
    n = b+(l*(c-a)-k*(d-b))/(i*l-j*k)*j
    o = (e-a)/(m-a) if m!=a else (f-b)/(n-b)
    p = (g-c)/(m-c) if m!=c else (h-d)/(n-d)
    print("Yes" if 0<o<1 and abs(o-p)<1e-9 else "No")
            
            
            
        