結果

問題 No.351 市松スライドパズル
ユーザー Konton7Konton7
提出日時 2019-05-23 22:47:56
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 384 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 11,932 KB
実行使用メモリ 80,760 KB
最終ジャッジ日時 2023-10-17 11:39:13
合計ジャッジ時間 29,524 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 WA -
testcase_02 AC 29 ms
10,148 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 29 ms
10,148 KB
testcase_06 WA -
testcase_07 AC 29 ms
10,148 KB
testcase_08 AC 29 ms
10,148 KB
testcase_09 AC 30 ms
10,148 KB
testcase_10 AC 29 ms
10,148 KB
testcase_11 WA -
testcase_12 AC 29 ms
10,152 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 = [ int(v) for v in input().split() ]
n = int(input())
rotate_list = []

for i in range(n):
	rotate_list.append(input())
y, x = 0, 0

for i in range(n):
	s = rotate_list[n-1-i]
	
	ope, target = s.split(" ")
	if int(target) == x:
		if ope == "R":
			x = (x-1) % w
	if int(target) == y:
		if ope == "C":
			y = (y-1) % h

if (x + y) % 2 == 0:
	print("white")
else:
	print("black")
0