thanks everybody. i'm still not 100% clear though, but maybe the former rule
comes prior to the latter one?

● 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*.
● In case of a tie, water will choose the first direction with the lowest
altitude from this list: North, West, East, South.

that rule (colored in red) made me think that 6 in first row is 'lower' than
6 in second row.

so what i drew in mind was this

→ a ←
→ ↑ ←

well, maybe i've been confused. :)

again, thanks everybody.




On Mon, Sep 7, 2009 at 2:22 PM, Hawston LLH <[email protected]> wrote:

> i think it depend on the definition of "flow", either from (high) to (low)
> or from (high) to (equal or lower).
> based on the definition given in the question "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*.", the
> 1st one (from high to low) is correct.
>
> So, it doesn't matter what the reality is in real life, it all matters what
> the question really say.
>
>
> On Mon, Sep 7, 2009 at 12:51 PM, tog <[email protected]> wrote:
>
>>
>> Well I think that since 6 is a sink you can not move to the other one ...
>> You cannot move to a place being at the same height (of your current
>> position) - no slope ;)
>>
>>
>> On Mon, Sep 7, 2009 at 8:25 AM, jz<[email protected]> wrote:
>> >
>> > hey folks, good job with gcj.
>> >
>> > i couldn't understand something in prob B 'watersheds'.
>> >
>> >
>> > in following case in sample input,
>> > [2 3]
>> > 7 6 7
>> > 7 6 7
>> >
>> > now upper 6 and downer 6 has same altitude.
>> >
>> > So what i thought was i should follow "NORTH WEST EAST SOUTH" rule,
>> >
>> > so upper 6 must be the sink, and the basin map should be
>> >
>> > a a a
>> > a a a
>> >
>> > not
>> > a a a
>> > b b b
>> >
>> > i don't understand why BOTH 6s are sinks. 'flows' follow 'tie
>> > situations' but 'sinks' don't?
>> >
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>>
>> http://cheztog.blogspot.com
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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