I'm processing the map into "start, end" pairs on input to detect runs. This makes the subsequent searches much easier, as well as drastically reducing the memory footprint for the larger tests. I haven't timed it, but it should be quite fast.
Unfortunately, even though my code passes all of the IDE tests (including the "all lake" test), it consistently fails the "No land" test on submission. Is that likely to be a validator bug?