結果

問題 No.351 市松スライドパズル
ユーザー cielciel
提出日時 2016-03-13 22:16:18
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 11,984 KB
実行使用メモリ 194,140 KB
最終ジャッジ日時 2023-10-26 03:31:30
合計ジャッジ時間 21,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,863 ms
194,100 KB
testcase_01 AC 82 ms
16,208 KB
testcase_02 AC 82 ms
16,208 KB
testcase_03 AC 83 ms
16,212 KB
testcase_04 WA -
testcase_05 AC 82 ms
16,208 KB
testcase_06 AC 83 ms
16,204 KB
testcase_07 WA -
testcase_08 AC 84 ms
16,208 KB
testcase_09 AC 84 ms
16,208 KB
testcase_10 AC 85 ms
16,208 KB
testcase_11 AC 84 ms
16,208 KB
testcase_12 AC 84 ms
16,208 KB
testcase_13 AC 1,865 ms
193,728 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 1,855 ms
194,100 KB
testcase_18 AC 1,835 ms
194,100 KB
testcase_19 WA -
testcase_20 AC 1,864 ms
194,100 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

H,W=gets.split.map(&:to_i)
N=gets.to_i
h=w=0
N.times.map{gets.split}.reverse.each{|(s,k)|
	h=(h+H-1)%W if s=="R"&&k.to_i==h
	w=(w+W-1)%W if s=="C"&&k.to_i==w
}
puts ["white","black"][(h+w)%2]
0