結果
| 問題 |
No.2564 衝突予測
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-08 01:23:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 77,440 KB |
| 最終ジャッジ日時 | 2024-09-27 02:33:00 |
| 合計ジャッジ時間 | 4,839 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 9 |
ソースコード
T = int(input())
d = {"R": [1, 0], "U": [0, 1], "L": [-1, 0], "D": [0, -1]}
for _ in range(T):
x1, y1, d1 = map(str, input().split())
x2, y2, d2 = map(str, input().split())
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
P = [x1 - x2, y1 - y2]
A = [0, 0]
d1 = d[d1]
d2 = d[d2]
A[0] = d2[0] - d1[0]
A[1] = d2[1] - d1[1]
if P[0] * A[1] == P[1] * A[0] and A[0] * P[0] >= 0:
print("Yes")
else:
print("No")