結果
問題 |
No.351 市松スライドパズル
|
ユーザー |
![]() |
提出日時 | 2019-05-23 22:49:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 79,544 KB |
最終ジャッジ日時 | 2024-09-17 09:54:31 |
合計ジャッジ時間 | 6,972 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 16 |
ソースコード
h, w = [ int(v) for v in input().split() ] n = int(input()) rotate_list = [] for i in range(n): rotate_list.append(input()) y, x = 0, 0 for i in range(n): s = rotate_list[n-1-i] ope, target = s.split(" ") if int(target) == y: if ope == "R": x = (x-1) % w if int(target) == x: if ope == "C": y = (y-1) % h if (x + y) % 2 == 0: print("white") else: print("black")