結果

問題 No.351 市松スライドパズル
ユーザー mkawa2mkawa2
提出日時 2020-03-19 00:30:16
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 715 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 251,768 KB
最終ジャッジ日時 2023-08-20 20:29:19
合計ジャッジ時間 8,870 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 614 ms
251,464 KB
testcase_01 AC 59 ms
71,432 KB
testcase_02 AC 59 ms
70,936 KB
testcase_03 AC 58 ms
71,484 KB
testcase_04 AC 56 ms
71,524 KB
testcase_05 AC 58 ms
71,392 KB
testcase_06 AC 58 ms
71,336 KB
testcase_07 AC 57 ms
71,084 KB
testcase_08 AC 57 ms
71,440 KB
testcase_09 AC 57 ms
71,472 KB
testcase_10 AC 57 ms
71,252 KB
testcase_11 AC 59 ms
70,972 KB
testcase_12 AC 58 ms
71,340 KB
testcase_13 AC 614 ms
247,668 KB
testcase_14 AC 630 ms
248,808 KB
testcase_15 AC 638 ms
251,600 KB
testcase_16 AC 715 ms
251,692 KB
testcase_17 AC 643 ms
251,768 KB
testcase_18 AC 617 ms
251,616 KB
testcase_19 AC 643 ms
251,664 KB
testcase_20 AC 637 ms
251,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w=map(int,input().split())
n=int(input())
sk=[input().split() for _ in range(n)]
i=j=0
for s,k in sk[::-1]:
    k=int(k)
    if s=="R" and i==k:j=(j-1)%w
    if s=="C" and j==k:i=(i-1)%h
if (i+j)&1:print("black")
else:print("white")
0