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 1022. Genealogical Tree

test #5
Posted by Kokan Ivan 21 Aug 2005 18:17
 can someone give me the test case #5?

 i got wa on that case.
 i'm using method of giving points to each person, so that every child has more points than his father. i'm doing that with bfs:

if points[child] <= points[parent]
  points[child] = points[parent] + 1;
bfs (child);

 i think method is right.
Re: test #5
Posted by Macarie 30 Aug 2005 03:51
you can find other tests here: http://timustests.lx.ro
test 5:
35
0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
1 4 5 9 2 3 0
10 0
11 0
12 4 5 6 7 8 9 0
13 0
14 0
15 0
16 0
17 0
18 0
2 3 4 28 5 6 1 7 8 9 10 11 12 13 17 19 0
0
2 0
0
0
15 0
0
0
0
14 13 12 11 0
0
0
33 34 30 0
0
0
0