結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,838 ms
194,100 KB
testcase_01 AC 81 ms
16,200 KB
testcase_02 AC 83 ms
16,208 KB
testcase_03 AC 83 ms
16,208 KB
testcase_04 WA -
testcase_05 AC 85 ms
16,208 KB
testcase_06 AC 86 ms
16,208 KB
testcase_07 AC 85 ms
16,208 KB
testcase_08 AC 87 ms
16,208 KB
testcase_09 AC 88 ms
16,208 KB
testcase_10 AC 85 ms
16,208 KB
testcase_11 AC 86 ms
16,208 KB
testcase_12 WA -
testcase_13 AC 1,830 ms
193,740 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 1,831 ms
194,100 KB
testcase_18 AC 1,816 ms
194,100 KB
testcase_19 WA -
testcase_20 AC 1,843 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)%H 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