結果

問題 No.351 市松スライドパズル
ユーザー tabataba
提出日時 2016-04-14 19:48:08
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 1,473 ms
コンパイル使用メモリ 76,688 KB
実行使用メモリ 247,272 KB
最終ジャッジ日時 2024-04-15 01:29:54
合計ジャッジ時間 9,909 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 631 ms
247,272 KB
testcase_01 AC 71 ms
75,900 KB
testcase_02 AC 68 ms
75,700 KB
testcase_03 AC 69 ms
75,592 KB
testcase_04 AC 70 ms
75,432 KB
testcase_05 AC 70 ms
75,288 KB
testcase_06 AC 69 ms
75,392 KB
testcase_07 WA -
testcase_08 AC 68 ms
75,792 KB
testcase_09 AC 70 ms
75,520 KB
testcase_10 WA -
testcase_11 AC 70 ms
75,520 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 625 ms
246,552 KB
testcase_16 WA -
testcase_17 AC 616 ms
246,124 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 636 ms
246,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w=map(int,raw_input().split())
n=input()
x=y=0
for sk in[raw_input().split()for i in xrange(n)][::-1]:
	k=int(sk[1])
	if sk[0]=="R" and y==k:
		x=(x-1+w)%w
	elif x==k:
		y=(y-1+h)%h
print["white","black"][x&1^y&1]
0