結果

問題 No.351 市松スライドパズル
ユーザー convexineqconvexineq
提出日時 2021-01-18 05:03:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,065 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 1,901 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 252,060 KB
最終ジャッジ日時 2023-08-20 11:54:15
合計ジャッジ時間 14,980 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,065 ms
251,664 KB
testcase_01 AC 85 ms
71,288 KB
testcase_02 AC 81 ms
71,564 KB
testcase_03 AC 80 ms
71,464 KB
testcase_04 AC 81 ms
71,312 KB
testcase_05 AC 79 ms
71,076 KB
testcase_06 AC 80 ms
71,280 KB
testcase_07 AC 80 ms
71,468 KB
testcase_08 AC 81 ms
71,192 KB
testcase_09 AC 81 ms
71,408 KB
testcase_10 AC 79 ms
71,356 KB
testcase_11 AC 81 ms
71,540 KB
testcase_12 AC 85 ms
71,312 KB
testcase_13 AC 932 ms
247,724 KB
testcase_14 AC 943 ms
249,172 KB
testcase_15 AC 966 ms
251,960 KB
testcase_16 AC 963 ms
252,060 KB
testcase_17 AC 941 ms
251,728 KB
testcase_18 AC 952 ms
251,584 KB
testcase_19 AC 976 ms
251,600 KB
testcase_20 AC 988 ms
251,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w = map(int,input().split())
n = int(input())
res = [input().split() for _ in range(n)]
x = y = 0
for a,b in res[::-1]:
    if a=="C" and y == int(b):
        x = (x-1)%h
    if a=="R" and x == int(b):
        y = (y-1)%w
print("black" if (x+y)%2 else "white")
0