結果
| 問題 |
No.351 市松スライドパズル
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-14 20:16:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 366 bytes |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 240,720 KB |
| 最終ジャッジ日時 | 2024-06-27 11:09:56 |
| 合計ジャッジ時間 | 9,771 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 17 |
ソースコード
H,W=map(int,input().split())
N=int(input())
A=[]
B=[]
for i in range(N):
x,y=input().split()
A.append(x)
B.append(int(y))
list.reverse(A)
list.reverse(B)
x=0
y=0
for i in range(N):
if A[i]=='R':
if B[i]==x:
y=(y-1+W)%W
else:
if B[i]==y:
x=(x-1+H)%H
if (x+y)%2:
print('Black')
else :
print('White')