結果

問題 No.351 市松スライドパズル
ユーザー mkawa2mkawa2
提出日時 2020-03-19 00:29:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 235 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 420,100 KB
最終ジャッジ日時 2023-08-20 20:29:02
合計ジャッジ時間 10,763 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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