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

Pages: 1 2 Next
If you got WA
Posted by Ilya Mitin 12 May 2008 19:49
0) AC solve is DP on tree.
1) In DP inf = 1e9.
2) All test in the forum:

5 5
3 1 1
4 1 10
2 3 20
3 5 20
ans = 21

7 4
1 2 10
1 3 20
2 4 30
2 5 0
3 6 0
3 7 40
ans = 100

4 1
1 2 1
1 3 2
2 4 3
ans = 2

5 1
1 2 1
1 5 0
2 3 0
2 4 0
ans = 1

7 3
1 2 1
1 3 39
2 4 40
2 5 40
3 6 39
3 7 39
ans = 117

5 2
1 3 1
1 4 10
2 3 20
3 5 20
ans = 21

Edited by author 12.05.2008 19:54
Re: If you got WA
Posted by Ai.Freedom 25 Jun 2008 00:42
thanks a lot for your test cases!
Re: If you got WA
Posted by sanok 15 Dec 2008 02:15
Thank you for test data. I suppose there is typo in case #1. Correct answer must be 51.
Re: If you got WA
Posted by Hakkinen 26 Jan 2009 18:41
kiitos!
I got AC
Re: If you got WA
Posted by evjava 24 Oct 2009 19:59
Why in the first example ans=21? I think it  must be 51.
Re: If you got WA
Posted by Mato_No1 25 Jul 2010 15:38
I could AC all your tests, but I still got WA.
Re: If you got WA
Posted by Oleg Strekalovsky [Vologda SPU] 31 Dec 2010 20:25
evjava wrote 24 October 2009 19:59
Why in the first example ans=21? I think it  must be 51.
First test is incorrect. Q must be <=N-1.
Re: If you got WA
Posted by Anton 9 Apr 2011 18:27
Big thanks!
Re: If you got WA
Posted by bojan 14 Oct 2011 06:15
THX
Re: If you got WA
Posted by BaJIuK 3 Nov 2011 02:25
My falt was that my inf was too litlle ^^ thx a lot!
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:43
哈哈
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:43
吃高高
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:44
吃JB
Re: If you got WA
Posted by ez_wyc 3 Dec 2011 06:44
吃粪汁啦 第一组和第三组数据吃粪一样的。。。第一组很明显不可能啦 第三组这叫一个苹果“二叉”树
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:44
什么是粪汁?
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:45
粪汁是不是一种汁
Re: If you got WA
Posted by EZ_YE88ZI 3 Dec 2011 06:45

Edited by author 03.12.2011 06:51

Edited by author 03.12.2011 06:51
Re: If you got WA
Posted by AndreyPikas [Yaroslavl SU] 4 Dec 2011 16:23
3-rd test case is incorrect, because "any biparous branch splits up to exactly two new branches"
Re: If you got WA
Posted by tcet 12 Mar 2012 22:19
哈哈
Re: If you got WA
Posted by vlyubin 29 Mar 2012 09:45
Remember that the tree should always be a tree (you can't split it into several components)...
Pages: 1 2 Next