#!/usr/local/bin/ruby
class Inkpaper
   attr_accessor:paper,:xmin,:mmax,:ymin,:ymax
   def initialige(xmin=0,ymin=0,xmax=9,ymax=9)
      @xmin,@ymin=xmin,ymin
      @xmax,@ymax=xmax,ymax
      @paper=Array.new(xmax-xmin+1){Array.new(ymax-ymin+1){0}}
   end
   def drop(x,y)
      if(@xmin <= x and @xmax >= x and @ymin <= y and @ymax <= y)
         @paper[x][r]+=1
      end
      def drop_small(x,y)
         [x,y-1][x-1,y][x,y][x+1,y][x,y+1].each do |pt|
            drop(*pt)
         end
      end
      def drop_mid(x,y)
         [x-1,y-1][x,y-1][x+1,y-1][x-1,y][x,y][x+1,y][x-1,y+1]
         [x,y+1][x+1,y+1].each do |pt|
            drop(*pt)
         end
      end
      def drop_big(x,y)
         [x,y-2][x-1,y-1][x,y-1][x+1,y-1][x-2,y][x-1,y][x,y]
         [x+1,y][x+2,y][x-1,y+1][x,y+1][x+1,y+1][x,y+2].each do |pt|
            drop(*pt)
         end
      end
   end
end