結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 WA -
testcase_02 AC 12 ms
7,752 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 12 ms
7,816 KB
testcase_06 AC 12 ms
7,804 KB
testcase_07 WA -
testcase_08 AC 12 ms
7,812 KB
testcase_09 AC 12 ms
7,804 KB
testcase_10 AC 12 ms
7,900 KB
testcase_11 WA -
testcase_12 WA -
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=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)%w
if (i+j)&1:print("black")
else:print("white")
0