結果
| 問題 |
No.351 市松スライドパズル
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-05-23 22:43:53 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 83 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 72,612 KB |
| 最終ジャッジ日時 | 2024-09-17 09:53:56 |
| 合計ジャッジ時間 | 24,740 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 4 WA * 4 TLE * 7 -- * 2 |
ソースコード
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 ope == "R" and int(target) == x:
x = (x-1) % w
if ope == "R" and int(target) == y:
y = (y-1) % h
if (x + y) % 2 == 0:
print("white")
else:
print("black")
Konton7