You can specify -1 as the node to receive from, and you block until you
receive from any node.
On 13 Jun 2015 04:51, "Stanislav Zholnin" <stanislav.zhol...@gmail.com>
wrote:

> Thank you for editorial! Previously there was usually no editorial for
> practice rounds (if you look into 2008), so this is nice development.
>
> Referring to problem "Shhhhh", official editorial states:
>
> "One way to handle this is to designate one node to be the master, and to
> handle distributing the intervals to calculate. This will also be the node
> that will output the answer. When any other node, going around the cycle
> from one special point, finds another special point, it will report the
> distance between them to the master. The master will then tell the
> reporting node what is the next special point it should start from (or that
> the calculation is finished, and it should exit)."
>
> I don't know how to make it work, as we do not have way of checking if
> there is incoming message from another node and as soon as Master called
> "Receive" it is commited to wait for incoming message from that specific
> node. So, though paragraph above makes perfect sense in real life, within
> contests as it is now, we can't have master node acting like server -
> waiting for incoming messages and responding to other nodes.
>
> Do I miss something here?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-code+unsubscr...@googlegroups.com.
> To post to this group, send email to google-code@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/e901ae21-0f69-4d96-9582-1030d7549e17%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAECKw-PxneKvQu%3DNsoNbS8H87h7O8kstGdXJs%3D_mi%3D%2B1nWN2Tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to