Problem 2658 · Medium
Flood-fill each connected patch of water, adding up its fish, and keep the richest patch.
Open the interactive visualisation