結果
問題 | No.351 市松スライドパズル |
ユーザー | ebicochineal |
提出日時 | 2016-03-12 04:54:30 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 11,896 KB |
実行使用メモリ | 415,632 KB |
最終ジャッジ日時 | 2023-10-25 06:36:48 |
合計ジャッジ時間 | 11,107 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | AC | 29 ms
10,160 KB |
testcase_02 | AC | 29 ms
10,160 KB |
testcase_03 | AC | 29 ms
10,160 KB |
testcase_04 | AC | 29 ms
10,160 KB |
testcase_05 | AC | 30 ms
10,160 KB |
testcase_06 | AC | 29 ms
10,160 KB |
testcase_07 | AC | 29 ms
10,160 KB |
testcase_08 | AC | 29 ms
10,160 KB |
testcase_09 | AC | 29 ms
10,160 KB |
testcase_10 | AC | 29 ms
10,160 KB |
testcase_11 | AC | 29 ms
10,168 KB |
testcase_12 | AC | 29 ms
10,168 KB |
testcase_13 | TLE | - |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
H, W = map(int, input().split()) N = int(input()) S = reversed([input().split() for _ in range(N)]) p = [0, 0] for i in S: a = int(i[1]) if i[0] == 'C' and p[1] == a: b = p[0]-1 if b<0:b=H-1 p[0] = b if i[0] == 'R' and p[0] == a: b = p[1]-1 if b<0:b=W-1 p[1] = b print('black' if (p[0]+p[1])%2 else 'white')