結果
| 問題 |
No.2628 Shrinkage
|
| コンテスト | |
| ユーザー |
AngrySadEight
|
| 提出日時 | 2025-03-05 16:55:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 626 bytes |
| コンパイル時間 | 583 ms |
| コンパイル使用メモリ | 82,384 KB |
| 実行使用メモリ | 89,208 KB |
| 最終ジャッジ日時 | 2025-03-05 16:55:57 |
| 合計ジャッジ時間 | 6,187 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 27 |
ソースコード
from fractions import Fraction
t=int(input())
for _ in range(t):
a1,b1,a2,b2,x1,y1,x2,y2=map(int, input().split())
if a1==x1 and b1==y1 and a2==x2 and b2==y2:
print('Yes')
continue
dis1=((b2-b1)**2+(a2-a1)**2)
dis2=((y2-y1)**2+(x2-x1)**2)
if x1==x2 and a1==a2:
if (b2-b1)*(y2-y1)>=0 and dis1>dis2:
print('Yes')
else:
print('No')
continue
elif x1==x2 or a1==a2:
print('No')
continue
f1=Fraction(b2-b1, a2-a1)
f2=Fraction(y2-y1, x2-x1)
if dis1>dis2 and f1==f2:
print('Yes')
else:
print('No')
AngrySadEight