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

Who can explain me this problem?(-)
Posted by Algorist 9 Mar 2002 01:40
hmm (+)
Posted by MadPsyentist/Sam 12 Mar 2002 08:29
the structure of employees is in the form of binary search tree and you
have to find the cost of transfering message from one employee to the
other employee

is this enough?
Re: hmm (+)
Posted by Algorist 12 Mar 2002 14:50
I got that :)) But I could not understand how the costs are formed. I
mean, how 1 15 is 8 (that is posted on the webboard) and such
stuff.... what are the prices of transferring one message from one
employee to another? That's what I couldn't get
yeah, I shall explain with this case (+)
Posted by MadPsyentist/Sam 12 Mar 2002 16:14
first of all , draw the binary search tree of 1-15 in your paper and look
at it along with the explaination

1 to 2 : 0 : they are direct subordinate and superior
2 to 3 : 0 : direct superior and subordinate
3 to 4 : 1 : 3 have to send to 2 to have 4 get the message
4 to 5 : 1 : have to pass 6
5 to 6 : 0 : again, direct
6 to 7 : 0
and this is a important part to make you really understand: 7 to 8 : 2 :
have to pass to 6 and then 4 to have 8 have the message
you sould understand now if my english is not too bad
anyway
8 to 9 : 2
9 to 10 : 0
10 to 11 : 0
11 to 12 : 1
12 to 13 : 1
13 to 14 : 0
14 to 15 : 0
and total is 8
Thanks for your patient exposition!!! Now I can understand it.
Posted by Koala 10 Aug 2002 16:04