ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1121. Branches

I don't understand this problem.
Posted by raxtinhac 29 May 2002 15:14
 Please explain the test, I think there 're something wrong or I
don't understand the task.
Re: I don't understand this problem.
Posted by Piratek-(akaDK) 1 Aug 2008 13:29
I've read that problem twice, but i didn't undestand
Re: I don't understand this problem.
Posted by Seraphy 27 Aug 2008 20:50
Sample is Correct, You misunderstanding the prob,
we didn't add the number's together, we "bit or" the number

Notice that the Branches ID is 1, 2, 4, 8, 16 ~~ and so on
So if this cross road has a Number 5 it means 1001(in Binary), so it has 2 branches : type 1 and type 3

we must output the total sum of branch types, so
when we meet two cross road with 5 and 1,we must use
operation 'bit or' (in C, it's '|') to  calculate the total sum of branch types.
so you understand?


Edited by author 27.08.2008 20:51
It is outrageous! (+)
Posted by ASK 4 Mar 2010 16:18
The obscurity of the statement is outrageous!

For each point you need to increase distances until you find a distance, such that there are some non-zeros or you reach the distance of 5. Once you reach the distance you need to bitwise OR all the numbers at this distance.
Re: It is outrageous! (+)
Posted by gautamvs 2 Jun 2013 16:18
Thanks, this is helping. but its very difficult to get this point of stopping at distance when one gets or of values greater than zero.