結果

問題 No.86 TVザッピング(2)
ユーザー gigurururugigurururu
提出日時 2014-12-05 00:09:27
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 15,436 KB
最終ジャッジ日時 2023-09-02 08:42:47
合計ジャッジ時間 4,904 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,136 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 86 ms
15,132 KB
testcase_04 WA -
testcase_05 AC 83 ms
15,272 KB
testcase_06 AC 81 ms
15,120 KB
testcase_07 WA -
testcase_08 AC 89 ms
15,284 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 88 ms
15,316 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 84 ms
15,272 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 88 ms
15,172 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 83 ms
15,332 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 82 ms
15,176 KB
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,m=gets.split.map &:to_i
l=(1..n).map{gets+?#}+[?#*m]
q=(0...n).map{|i|(0...m).count{|j|l[i][j]!=?#&&[[i+1,j],[i-1,j],[i,j+1],[i,j-1]].count{|a,b|l[a][b]==?.}%2>0}}.inject(:+)
puts q%2>0?:NO:"YES"
0