結果

問題 No.351 市松スライドパズル
ユーザー akitsugu777akitsugu777
提出日時 2019-07-30 15:24:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 297 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 422,056 KB
最終ジャッジ日時 2023-09-18 01:47:17
合計ジャッジ時間 10,316 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 16 ms
7,764 KB
testcase_02 AC 16 ms
7,780 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 15 ms
7,764 KB
testcase_05 AC 16 ms
7,760 KB
testcase_06 AC 16 ms
7,828 KB
testcase_07 AC 15 ms
7,848 KB
testcase_08 AC 16 ms
7,872 KB
testcase_09 AC 16 ms
7,792 KB
testcase_10 AC 16 ms
7,792 KB
testcase_11 AC 16 ms
7,904 KB
testcase_12 AC 17 ms
7,984 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w = map(int,input().split())
n = int(input())
l = [input().split() for _ in range(n)]

x = y = 0
for s, k in l[::-1]:
    k = int(k)
    if s == 'R' and k == y:
        x = (x-1) % w
    elif s == 'C' and k == x:
        y = (y-1) % h

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