結果

問題 No.351 市松スライドパズル
ユーザー JunOnumaJunOnuma
提出日時 2017-05-23 18:26:52
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 339 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 7,116 KB
実行使用メモリ 287,276 KB
最終ジャッジ日時 2023-10-19 15:37:35
合計ジャッジ時間 28,449 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 11 ms
6,452 KB
testcase_02 AC 11 ms
6,452 KB
testcase_03 AC 11 ms
6,452 KB
testcase_04 AC 11 ms
6,452 KB
testcase_05 AC 11 ms
6,452 KB
testcase_06 AC 11 ms
6,452 KB
testcase_07 AC 11 ms
6,452 KB
testcase_08 AC 11 ms
6,452 KB
testcase_09 AC 11 ms
6,452 KB
testcase_10 AC 11 ms
6,452 KB
testcase_11 AC 12 ms
6,456 KB
testcase_12 AC 12 ms
6,456 KB
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, raw_input().split())
k = int(raw_input())
l = [raw_input().split() for _ in range(k)]
x = 0
y = 0
i = k-1
while i >= 0:
    c, j = l[i]
    if c == 'R' and y == int(j):
        x = (x+w-1) % w
    elif c == 'C' and x == int(j):
        y = (y+h-1) % h
    i -= 1
if (x+y) % 2 == 0:
    print 'white'
else:
    print 'black'
0