結果
| 問題 | No.351 市松スライドパズル |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-14 20:17:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 504 ms / 2,000 ms |
| + 745µs | |
| コード長 | 366 bytes |
| 記録 | |
| コンパイル時間 | 250 ms |
| コンパイル使用メモリ | 95,596 KB |
| 実行使用メモリ | 246,852 KB |
| 最終ジャッジ日時 | 2026-07-31 03:30:53 |
| 合計ジャッジ時間 | 8,216 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 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')