結果
| 問題 |
No.2564 衝突予測
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-02 16:58:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,319 bytes |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-26 20:55:51 |
| 合計ジャッジ時間 | 9,698 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 5 |
ソースコード
a=int(input())
for i in range(a):
b,c,d=input().split()
b,c=int(b),int(c)
e,f,g=input().split()
e,f=int(e),int(f)
if d==g:
print("No")
continue
if (d=="U" and g=="D"):
if b==e and f-c>0:
print("Yes")
else:
print("No")
elif (d=="D" and g=="U"):
if b==e and c-f>0:
print("Yes")
else:
print("No")
elif (d=="R" and g=="L"):
if c==f and e-b>0:
print("Yes")
else:
print("No")
elif (d=="L" and g=="R"):
if c==f and b>e>0:
print("Yes")
else:
print("No")
elif (d=="U" and g=="L"):
if e-b==f-c and e-b>0 and f-c>0:
print("Yes")
else:
print("No")
elif (d=="L" and g=="U"):
if e-b==f-c and b-e>0 and c-f>0:
print("Yes")
else:
print("No")
elif (d=="U" and g=="R"):
if e-b==c-f and b-e>0 and f-c>0:
print("Yes")
else:
print("No")
elif (d=="R" and g=="U"):
if e-b==c-f and e-b>0 and c-f>0:
print("Yes")
else:
print("No")
elif (d=="R" and g=="D"):
if e-b==f-c and e-b>0 and f-c>0:
print("Yes")
else:
print("No")
elif (d=="D" and g=="R"):
if b-e==c-f and b-e>0 and c-f>0:
print("Yes")
else:
print("No")
elif (d=="D" and g=="L"):
if e-b==c-f and e-b>0 and c-f>0:
print("Yes")
else:
print("No")
elif (d=="L" and g=="D"):
if b-e==f-c and b-e>0 and f-c>0:
print("Yes")
else:
print("No")
else:
a=a