結果
| 問題 |
No.351 市松スライドパズル
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-05 02:26:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 425 bytes |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 74,476 KB |
| 最終ジャッジ日時 | 2024-10-12 12:27:22 |
| 合計ジャッジ時間 | 8,014 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 WA * 10 |
ソースコード
import sys
h,w=map(int,input().split())
n=int(input())
d=sys.stdin.read().splitlines()
s=0
t=0
if h==w==1:
print("white")
else:
for k in d[::-1]:
if s == 'R ' + str(t):
s= s-1 if s!=0 else w-1
elif k=='R '+str(s):
t= t-1 if t!=0 else h-1
if (s%2==1 and t%2==0) or (s%2==0 and t%2==1):
print("black")
else:
print("white")