Islands: Difference between revisions
Jump to navigation
Jump to search
imported>Kmk21 Created page with "Given a map, with marked land, water, and ???, determine the minimum number of disjoint pieces of land. Quite a simple flood fill. When you find a piece of land, flood fill e..." |
imported>Kmk21 No edit summary |
||
Line 7: | Line 7: | ||
[[Category:ICPC Problems]] | [[Category:ICPC Problems]] | ||
[[Category:Midatl2016]] | [[Category:Midatl2016]] | ||
[[Category:Ser2016 | |||
[[Category:Algorithm Easy]] | [[Category:Algorithm Easy]] | ||
[[Category:Implementation Easy]] | [[Category:Implementation Easy]] | ||
[[Category:Grid]] | [[Category:Grid]] | ||
[[Category:BFS]] | [[Category:BFS]] |
Revision as of 05:11, 2 November 2017
Given a map, with marked land, water, and ???, determine the minimum number of disjoint pieces of land.
Quite a simple flood fill. When you find a piece of land, flood fill everything around it, including clouds, assuming they are land, and count 1 island.
All other clouds (which don't touch land) are considered water. [[Category:Ser2016