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 1088. Ilya Murometz

Can somebody give me full explanation of this problem?
Posted by Roman Lipovsky 25 Oct 2004 21:15
Can somebody give me full explanation of this problem?
Thanks.
I barely believe anyone can. Ask questions (-)
Posted by Michael Rybak (accepted@ukr.net) 26 Oct 2004 17:00
Re: I barely believe anyone can. Ask questions (-)
Posted by Roman Lipovsky 26 Oct 2004 17:09
Full binary tree.
Ilya is on the deep D, magis stone is on deep E.
But what mean numbers Dp and Ep?
Ep specifies one of the leafs, which are in Ilya's subtree. Dp specifies one of the leafs, which are in the magis stone's subtree (+)
Posted by Michael Rybak (accepted@ukr.net) 26 Oct 2004 18:32
You know the deepness of each by D and E, but this isn't enough to know, which exactly nodes are considered. So, in this problem the nodes are specified by 2 parameters: deepness, and a number of some leaf of it's subtree. Obviously, there can be many different pairs describing the same node. In this problem, only leafs are enumerated (see problem statement).

Edited by author 26.10.2004 18:35

Edited by author 26.10.2004 19:32
Re: Ep specifies one of the leafs, which are in Ilya's subtree. Dp specifies one of the leafs, which are in the magis stone's subtree (+)
Posted by Roman Lipovsky 26 Oct 2004 19:26
Thanks a lot!
Re: Can somebody give me full explanation of this problem?
Posted by Nirjon 24 Jun 2005 02:15
Full Binary Tree with depth: F

Stone is at depth: F-D from root and a tree rooted at the stone holds leaf #Dp

Ilya is at depth: F-E from root and a tree rooted at the Ilya's position holds leaf #Ep

find whether the distance of the two nodes is <= H