結果

問題 No.351 市松スライドパズル
ユーザー akitsugu777akitsugu777
提出日時 2019-07-30 15:21:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 284 bytes
コンパイル時間 619 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 242,300 KB
最終ジャッジ日時 2023-09-18 01:41:40
合計ジャッジ時間 11,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 16 ms
7,756 KB
testcase_02 AC 16 ms
7,752 KB
testcase_03 AC 16 ms
7,748 KB
testcase_04 AC 16 ms
7,840 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 16 ms
7,796 KB
testcase_07 AC 16 ms
7,752 KB
testcase_08 AC 16 ms
7,760 KB
testcase_09 AC 16 ms
7,748 KB
testcase_10 AC 17 ms
7,780 KB
testcase_11 AC 16 ms
7,708 KB
testcase_12 AC 16 ms
7,788 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

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