結果
問題 | No.351 市松スライドパズル |
ユーザー | matsukin1111 |
提出日時 | 2018-12-15 14:18:43 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 11,752 KB |
実行使用メモリ | 236,672 KB |
最終ジャッジ日時 | 2023-10-25 21:49:42 |
合計ジャッジ時間 | 10,784 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | AC | 29 ms
10,024 KB |
testcase_02 | AC | 29 ms
10,024 KB |
testcase_03 | AC | 30 ms
10,024 KB |
testcase_04 | AC | 28 ms
10,024 KB |
testcase_05 | AC | 30 ms
10,024 KB |
testcase_06 | AC | 29 ms
10,024 KB |
testcase_07 | AC | 29 ms
10,024 KB |
testcase_08 | AC | 29 ms
10,024 KB |
testcase_09 | AC | 30 ms
10,024 KB |
testcase_10 | AC | 29 ms
10,024 KB |
testcase_11 | AC | 30 ms
10,036 KB |
testcase_12 | AC | 29 ms
10,036 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
H_W = list(map(int,input().split())) N = int(input()) data = [input().split() for l in range(N)] s = [0,0] for i in range(N-1,-1,-1): if data[i][0] == 'R' and int(data[i][1]) == s[1]: s[0] = s[0]-1 if s[0] > 0 else H_W[1]-1 elif data[i][0] == 'C' and int(data[i][1]) == s[0]: s[1] = s[1]-1 if s[1] > 0 else H_W[0]-1 print('white') if (s[0]+s[1])%2 == 0 else print('black')