結果

問題 No.351 市松スライドパズル
ユーザー tabataba
提出日時 2016-04-14 19:58:45
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 239 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 211,252 KB
最終ジャッジ日時 2024-04-15 01:30:34
合計ジャッジ時間 7,318 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 11 ms
6,944 KB
testcase_02 AC 12 ms
6,944 KB
testcase_03 AC 12 ms
6,940 KB
testcase_04 AC 11 ms
6,940 KB
testcase_05 AC 11 ms
6,944 KB
testcase_06 AC 11 ms
6,944 KB
testcase_07 AC 11 ms
6,940 KB
testcase_08 AC 12 ms
6,944 KB
testcase_09 AC 12 ms
6,944 KB
testcase_10 AC 11 ms
6,940 KB
testcase_11 AC 11 ms
6,944 KB
testcase_12 AC 12 ms
6,944 KB
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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