結果
問題 |
No.351 市松スライドパズル
|
ユーザー |
![]() |
提出日時 | 2016-04-14 19:58:45 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 239 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 258,944 KB |
最終ジャッジ日時 | 2024-10-04 08:52:04 |
合計ジャッジ時間 | 27,104 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 TLE * 9 |
ソースコード
h,w=map(int,raw_input().split()) n=input() x=0 y=0 for sk in[raw_input().split()for i in xrange(n)][::-1]: #print sk,x,y k=int(sk[1]) if ord(sk[0])==82: if y==k: x=(x-1+w)%w elif x==k: y=(y-1+h)%h print["white","black"][x&1^y&1]