結果

問題 No.179 塗り分け
ユーザー gigurururugigurururu
提出日時 2015-04-06 00:44:12
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2024-10-02 13:36:59
合計ジャッジ時間 59,720 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
12,288 KB
testcase_01 AC 90 ms
12,288 KB
testcase_02 AC 91 ms
12,032 KB
testcase_03 AC 91 ms
12,160 KB
testcase_04 AC 96 ms
12,288 KB
testcase_05 AC 319 ms
13,056 KB
testcase_06 AC 203 ms
13,056 KB
testcase_07 WA -
testcase_08 AC 1,855 ms
12,288 KB
testcase_09 WA -
testcase_10 TLE -
testcase_11 AC 2,661 ms
12,416 KB
testcase_12 AC 2,668 ms
12,160 KB
testcase_13 AC 98 ms
12,544 KB
testcase_14 AC 94 ms
12,416 KB
testcase_15 AC 91 ms
12,288 KB
testcase_16 AC 90 ms
12,032 KB
testcase_17 AC 89 ms
12,032 KB
testcase_18 AC 2,476 ms
12,160 KB
testcase_19 AC 2,279 ms
12,288 KB
testcase_20 AC 2,283 ms
12,416 KB
testcase_21 AC 1,948 ms
12,160 KB
testcase_22 AC 1,954 ms
12,288 KB
testcase_23 AC 2,180 ms
12,288 KB
testcase_24 AC 1,938 ms
12,416 KB
testcase_25 AC 1,948 ms
12,288 KB
testcase_26 WA -
testcase_27 AC 2,223 ms
12,416 KB
testcase_28 WA -
testcase_29 AC 2,417 ms
12,288 KB
testcase_30 WA -
testcase_31 AC 2,544 ms
12,160 KB
testcase_32 AC 2,575 ms
12,160 KB
testcase_33 AC 2,573 ms
12,416 KB
testcase_34 WA -
testcase_35 AC 2,688 ms
12,288 KB
testcase_36 AC 89 ms
12,160 KB
testcase_37 AC 89 ms
12,160 KB
testcase_38 AC 88 ms
12,288 KB
testcase_39 AC 90 ms
12,160 KB
testcase_40 AC 91 ms
12,160 KB
testcase_41 AC 90 ms
12,288 KB
testcase_42 AC 92 ms
12,032 KB
testcase_43 AC 133 ms
13,184 KB
testcase_44 AC 355 ms
13,184 KB
testcase_45 AC 101 ms
12,672 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

H,W=gets.split.map(&:to_i)
m=(1..H).map{gets.chomp}+[""]*50

ans=false
H.times{|i|W.times{|j|
  next if i==0&&j==0

  tm=m.map{|l|l.dup}
  H.times{|h|W.times{|w|
    if tm[h][w]==?# && tm[h+i][w+j]==?#
      tm[h][w]=tm[h+i][w+j]=?.
    end
  }}

  ans = true if !(tm*"")[?#]
}}
puts ans ?:YES:"NO"
0