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

About Problem 1018
Posted by Marat Bakirov 23 Apr 2001 18:35
> but for this test my program show 60 (i thing that 70 is
> OK)
> 5 2
> 1 2 10
> 2 3 50
> 1 4 30
> 4 5 40

THIS is a VERY GOOD example, showing that greedy algorithm
is not working!

Tests updated, problem unlocked.

Thank you all for support and espexially toPavel Aksonov.
And all submits are redjudged
Posted by Marat Bakirov 23 Apr 2001 20:45
Re: please note!!
Posted by Ilya Semenov (NSU) 24 Apr 2001 10:46
> > 5 2
> > 1 2 10
> > 2 3 50
> > 1 4 30
> > 4 5 40
>
> THIS is a VERY GOOD example, showing that greedy algorithm
> is not working!
>
> Tests updated, problem unlocked.


The quote from the problem definition:
"...You're right, it looks just like a binary tree, i.e.
any biparous branch splits up to exactly two new branches."

But the given tree's branches 1-2 and 1-4 DO NOT split into
two new branches, thus it CAN NOT occur in the tests!
You are right, thank you. But i made a correct test.
Posted by Marat Bakirov 26 Apr 2001 17:55