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 1018. Binary Apple Tree

What is the answer for this test?
Posted by Roman Lipovsky 27 Oct 2004 02:07
What is the answer for this test?

4 1
1 2 1
2 3 0
2 4 0

Can i remove 0-branches from tree or not?
This particular test case is incorrect, becase the root has only one son (-)
Posted by Michael Rybak (accepted@ukr.net) 27 Oct 2004 11:30
Re: This particular test case is incorrect, becase the root has only one son (-)
Posted by Roman Lipovsky 27 Oct 2004 16:56
Another test:

5 1
1 2 1
1 5 0
2 3 0
2 4 0
Must be 1 (-)
Posted by Michael Rybak (accepted@ukr.net) 27 Oct 2004 16:58
Re: Must be 1 (-)
Posted by Roman Lipovsky 27 Oct 2004 17:01
So can i remove 0-branches?

Edited by author 27.10.2004 17:03
Yes, sure. Why would you think you can't? (+)
Posted by Michael Rybak (accepted@ukr.net) 27 Oct 2004 17:08
The idea of not-removing 0-branches arised because the test where incorrect.
Re: Yes, sure. Why would you think you can't? (+)
Posted by Roman Lipovsky 27 Oct 2004 17:10
Thank you for explanation :)
Hello Roman! I have WA on test #6, and you? Can anybody help me? I can not understand what is wrong :(. Thanks.
Posted by Victor Barinov (TNU) 28 Oct 2004 00:19
Re: Hello Roman! I have WA on test #6, and you? Can anybody help me? I can not understand what is wrong :(. Thanks.
Posted by Roman Lipovsky 28 Oct 2004 02:26
I don't solved 1018 yet.
But i think that this problem can be solved with DP.
Re: Hello Roman! I have WA on test #6, and you? Can anybody help me? I can not understand what is wrong :(. Thanks.
Posted by dypjill 16 Sep 2006 06:36
Mine is crash(stack overflow),can you help me.