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

to get accepted
Posted by Paul Diac 31 Oct 2004 23:41
    To get AC you should not make the sum of all the types of nearest brangches but the "or" in pascal and "|" in c++. examle:
1+5+2=8 but you get WA
1|5|2=7 in c++ to get AC
1 or 5 or 2 =7 in pascal to get AC
    I don't know why, but this is the way to get accepted. Can anyone explain why? (the problem text seems ambiguos to me).
Re: to get accepted
Posted by Roman Lipovsky 1 Nov 2004 12:14
You must find sum of (!) different branches for each cross-road.

In your test:
1 = 1
2 = 2
5 = 1+4

So, there are 3 different branches(1,2,4) and sum = 7
Re: to get accepted
Posted by AlexF 26 Jul 2006 23:33
Thanks a lot! To use or is more simple then solve that problem without it! )