Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
m = $<.read.lines.map do |l|
" #{l.chomp} "
end
e = ' '*52
m = [e, *m, e]
n = Array.new(52,e)
(1..3).each do |r|
(1..3).each do |c|
puts r,c
h = m[r][c]
k = m[r+1][c-1..c+1]+m[r-1][c-1..c+1]+m[r][c-1]+m[r][c+1]
if h='.' and k.scan('|').count>3
end
end
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more