結果
| 問題 | No.2628 Shrinkage |
| コンテスト | |
| ユーザー |
添え字
|
| 提出日時 | 2024-02-16 21:46:40 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 341 ms |
| コンパイル使用メモリ | 85,072 KB |
| 実行使用メモリ | 55,232 KB |
| 最終ジャッジ日時 | 2026-04-15 08:49:46 |
| 合計ジャッジ時間 | 2,434 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 27 |
ソースコード
def same_sign(x, y):
return (x >= 0) == (y >= 0)
T = int(input())
for i in range(T):
x1, y1, x2, y2, X1, Y1, X2, Y2 = map(int, input().split())
P1 = complex(x1, y1)
P2 = complex(x2, y2)
Q1 = complex(X1, Y1)
Q2 = complex(X2, Y2)
A = P1-P2
B = Q1-Q2
if abs(A) > abs(B) and B != 0 and (A/B).imag == 0:
if same_sign(A.real, B.real) and same_sign(A.imag, B.imag):
print("Yes")
else:
print("No")
添え字