Submission #44042489


Source Code Expand

n,m=gets.split.map &:to_i
gr=[]
n.times do
  gr<<gets.chomp
end
(0..n-9).each do|i|
  (0..m-9).each do|j|
    ok=true
    (i...i+9).each do|u|
      (j...j+9).each do|v|
        if [u-i,v-j].max<3&&gr[u][v]!='#'
          ok=false
        end
        if [u-i,v-j].max==3&&gr[u][v]!='.'
          ok=false
        end
        if [u-i,v-j].min>5&&gr[u][v]!='#'
          ok=false
        end
        if [u-i,v-j].min==5&&gr[u][v]!='.'
          ok=false
        end
      end
    end
    if ok
      puts [i+1,j+1]*" "
    end
  end
end

Submission Info

Submission Time
Task B - TaK Code
User chromate00
Language Ruby (2.7.1)
Score 200
Code Size 562 Byte
Status AC
Exec Time 207 ms
Memory 14296 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 17
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 204 ms 14032 KiB
random_02.txt AC 191 ms 14068 KiB
random_03.txt AC 76 ms 14112 KiB
random_04.txt AC 108 ms 14296 KiB
random_05.txt AC 206 ms 14028 KiB
random_06.txt AC 158 ms 14200 KiB
random_07.txt AC 186 ms 14144 KiB
random_08.txt AC 77 ms 14232 KiB
random_09.txt AC 207 ms 14212 KiB
random_10.txt AC 201 ms 14128 KiB
random_11.txt AC 199 ms 14100 KiB
random_12.txt AC 203 ms 14192 KiB
random_13.txt AC 206 ms 14004 KiB
random_14.txt AC 202 ms 14140 KiB
sample_01.txt AC 59 ms 14072 KiB
sample_02.txt AC 57 ms 14204 KiB
sample_03.txt AC 60 ms 14060 KiB