Sheba’s Amoebas

From programming_contest
Revision as of 00:53, 2 November 2017 by imported>Kmk21 (Created page with "walk the graph. flood fill when you find a box and +1 to your count. Be sure to use the easy flood fill implementation when iterating: for (i = -1;i<2;i++)for(j=-1;j<2;j++)if...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

walk the graph. flood fill when you find a box and +1 to your count.

Be sure to use the easy flood fill implementation when iterating: for (i = -1;i<2;i++)for(j=-1;j<2;j++)if(i!=j&&i*j!=0&&<in_bounds>&&<visited>)