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 1117. Hierarchy

Could anyone explain me why the answer for test 1 8 is 4?
Posted by Dima 8 Aug 2006 15:14
I think it must be three.
1 gives to 2 - 0
2 gives to 3 - 0
3 gives to 4 - 1
4 gives to 5 - 2
5 gives to 6 - 2
6 gives to 7 - 2
7 gives to 8 - 3

I cant understand how it can be 4.
Even Tolstobrov_Anatoliy[Ivanovo SPU] gave some tests
(http://acm.timus.ru/forum/thread.aspx?space=1&num=1117&id=11659&upd=632589453091063750)
and there are such tests:
1 7 2
1 8 4
So I'm right up to the 7'th employee. Then we add 1.

Thank.
Re: Could anyone explain me why the answer for test 1 8 is 4?
Posted by Burunduk1 8 Aug 2006 17:30
1 gives to 2 - 0
2 gives to 3 - 0
3 gives to 4 - 1
4 gives to 5 - 1
5 gives to 6 - 0
6 gives to 7 - 0
7 gives to 8 - 2
Re: Could anyone explain me why the answer for test 1 8 is 4?
Posted by Dima 8 Aug 2006 21:09
My awfull mistake!!!
Forgot, that
the message delivery takes an amount of days that is equal to the number of intermediate employees between the sender and recipient.
Thank you.