On Sep 7, 9:11 am, jz <[email protected]> wrote:
> ● For each cell, if none of its 4 neighboring cells has a lower altitude
> than the current cell's, then the water does not flow, and the current cell
> is called a *sink*.

I you take a look at the lower 6, you'll see it has no neighbor with a
lower altitude (pay attention to the rule quoted above, it says only
LOWER not LOWER OR EQUAL), only one with the same altitude (the upper
six), and 2 neighbors with a higher altitude. So the lower 6 is also a
sink, that's why you have 2 flows.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to