結果
| 問題 |
No.351 市松スライドパズル
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 18:49:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 865 ms / 2,000 ms |
| コード長 | 393 bytes |
| コンパイル時間 | 220 ms |
| コンパイル使用メモリ | 82,652 KB |
| 実行使用メモリ | 247,600 KB |
| 最終ジャッジ日時 | 2025-03-20 18:51:35 |
| 合計ジャッジ時間 | 10,390 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 |
ソースコード
H, W = map(int, input().split())
N = int(input())
operations = []
for _ in range(N):
S, K = input().split()
operations.append((S, int(K)))
i, j = 0, 0
for op in reversed(operations):
S, K = op
if S == 'R':
if i == K:
j = (j - 1) % W
else:
if j == K:
i = (i - 1) % H
if (i + j) % 2 == 0:
print("white")
else:
print("black")
lam6er