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

add test
Posted by Ken 24 Mar 2016 19:25
i have a test:
5 2
1 2 1
1 4 20
1 5 20
2 3 10
i think answer is 21 but my AC code answer is 40
maybe i wrong???
Re: add test
Posted by ToadMonster 8 Apr 2016 14:01
Is test correct?
Aren't there 3 branches from "1" node?

Also, why 40 isn't ok? Let 2 survived branches are "1 4" and "1 5", with 20+20=40 total apples.

Edited by author 08.04.2016 14:02