結果

問題 No.351 市松スライドパズル
ユーザー tookunn_1213tookunn_1213
提出日時 2016-03-12 00:13:30
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 1,777 ms
コンパイル使用メモリ 77,140 KB
実行使用メモリ 812,976 KB
最終ジャッジ日時 2023-10-25 06:11:40
合計ジャッジ時間 5,847 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

H,W = map(int,raw_input().split())
N = int(raw_input())
tile = [[(i + j) % 2 for j in range(W)]for i in range(H)]
for i in range(N):
	S,K = raw_input().split()
	K = int(K)
	if S == 'R':
		right = tile[K][W - 1]
		for c in range(1,W):
			tile[K][c] = tile[K][c - 1]
		tile[K][0] = right
	else:
		bottom = tile[H - 1][K]
		for r in range(1,H):
			tile[r][K] = tile[r - 1][K]
		tile[0][K] = bottom
if tile[0][0] == 0:
	print 'white'
else:
	print 'black'
0