      (bitmap, raster),    (pixel)            (   ,    ).

,            .

           (  GIMP   Adobe Photoshop)     (  Paint  Windows)     (fill bucket).        '     ""      ,      --       .

   ,    ,        (       ),             .

       flood fill,      .
,     ,  '                ,     :      ,         '     ,      ,         ,           ( )       '   .

       .  '    : 
     FIFO (     )                    .
                      ,                     .
 ,     ,                 ,     : 
                    .           ,          ,          .

          ,              (,   ,        /).
        (X, Y),            ;
              (, -1),              (, +1),           (-1, ),            (+1, ).         4 .   ,    8 ,  4     4 .

,     4 . ..,   (1, 1)    ,     ,   .
,    (, ): 
-    (, -1)    -1 > 0 (   )
-    (, +1)    +1 <=  (   )
-    (-1, )    -1 > 0 (   )
-    (+1, )    +1 <=  (   )

            .        ,   "" ASCII. ,             (  ).
          ,   (  <= 55)    (  <= 100)  ,     ,      *        [100, 55].          :

 i  1  
   j  1  
     [i, j] 
  _
_

 ,      ,        ,            .
    ,     ,   ,       ,       .
     10000  '        .



1.
   flood fill,  
https://en.wikipedia.org/wiki/Flood_fill

2.
 "" ASCII    testcases   
http://fsymbols.com/text-art/

3.
  output  testcases,   ( )    '    bucket fill   .
,         flood fill   4 .

4.
    bucket fill   :

 
________00000000000___________000000000000_________
______00000000_____00000___000000_____0000000______
____0000000_____________000______________00000_____
___0000000_______________0_________________0000____
__000000____________________________________0000___
__00000_____________________________________00000__
_00000______________________________________00000__
_00000_____________________________________000000__
__000000_________________________________0000000___
___0000000______________________________0000000____
_____000000____________________________000000______
_______000000________________________000000________
__________00000_____________________0000___________
_____________0000_________________0000_____________
_______________0000_____________000________________
_________________000_________000___________________
____________________000_____00_____________________
______________________00__00_______________________
________________________00_________________________


   
________00000000000___________000000000000_________
______00000000#####00000___000000#####0000000______
____0000000#############000##############00000_____
___0000000###############0#################0000____
__000000####################################0000___
__00000#####################################00000__
_00000######################################00000__
_00000#####################################000000__
__000000#################################0000000___
___0000000##############################0000000____
_____000000############################000000______
_______000000########################000000________
__________00000#####################0000___________
_____________0000#################0000_____________
_______________0000#############000________________
_________________000#########000___________________
____________________000#####00_____________________
______________________00##00_______________________
________________________00_________________________
