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

WA#6 Help, please!!!
input:
100
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
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
84 0
0
14 13 12 11 0
0
0
33 34 30 0
0
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
92 84 11 0


My program outputs:
20 53 86 19 52 85 18 51 100 84 17 50 83 16 25 49 58 82 91 15 29 48 62 81 95 14 47 80 13 46 79 12 45 78 11 44 77 10 43 76 9 42 75 8 41 74 7 40 73 6 39 72 5 38 71 4 37 70 3 22 36 55 69 88 2 35 68 1 21 23 24 26 27 28 32 65 98 30 31 33 34 54 56 57 59 60 61 63 64 66 67 87 89 90 92 93 94 96 97 99

Why is it wrong??? I think it's true, but I have WA#6!!!

Edited by author 03.01.2007 09:11
Re: WA#6 Help, please!!!
Can anyone give me a true answer???

Edited by author 03.01.2007 09:11
No subject
[text deleted by author]

Edited by author 09.01.2007 00:30
No subject
[text deleted by author]

Edited by author 09.01.2007 00:30
Re: WA#6 Help, please!!!
may be anyone can find an error in my code???

[code deleted by author].

Edited by author 29.01.2007 12:48
Re: WA#6 Help, please!!!
Posted by AlexF [USTU] 9 Jan 2007 12:02
On your test my AC prog outputs
20 21 22 23 24 25 26 27 29 31 32 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 85 86 19 18 28 87 88 89 90 91 93 94 95 96 97 98 30 33 34 99 100 84 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 92
Good Luck!)
Re: WA#6 Help, please!!!
Posted by Lomir 11 Jan 2007 15:59
My AC programm gets:
86 53 20 100 85 60 52 19 84 51 18 83 50 17 91 82 58 49 25 6 95 81 62 48 29 15 80 47 14 79 46 13 78 45 12 77 44 11 76 43 10 75 42 9 74 41 8 73 40 7 72 39 6 71 38 5 70 37 4 88 69 55 36 22 3 98 68 65 35 32 2 99 97 96 94 3 92 90 89 87 67 66 64 63 61 59 57 56 54 34 33 31 30 28 27 26 24 23 21 1
So there are a lot of posibilities on this huge test.

Edited by author 11.01.2007 16:00
Re: WA#6 Help, please!!!
Now I have AC!!!
I have one stupid error!!!
My answer is:
20 53 86 19 52 85 18 51 100 60 84 17 50 83 16 25 49 58 82 91 15 29 48 62 81 95 14 47 80 13 46 79 12 45 78 11 44 77 10 43 76 9 42 75 8 41 74 7 40 73 6 39 72 5 38 71 4 37 70 3 22 36 55 69 88 2 35 68 1 21 23 24 26 27 28 32 65 98 30 31 33 34 54 56 57 59 61 63 64 66 67 87 89 90 92 93 94 96 97 99
Re: WA#6 Help, please!!!
Posted by Marshal 9 May 2007 10:58
My program gives the following answer:
100 92 99 98 97 96 95 94 93 91 90 89 88 87 86 85 83 82 81 80 79 78 77 76 75 73 72 71 70 69 68 67 66 65 64 63 62 61 60 84 59 58 57 56 55 54 53 52 51 50 49 47 46 45 44 43 42 41 40 39 38 37 36 35 32 34 33 30 31 29 27 26 25 24 23 22 21 28 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
I thought, that the answer is not true, but have sent my solution and has got AC....  It looks a litle strange, isn't it?)
P. S. I used topological sorting
Re: WA#6 Help, please!!!
Posted by Snetch 29 Nov 2007 05:14
My AC prog outputs (not like that, but in one line, of course)
53 20 86 100 19 52 85 60 84 18
51 17 83 50  49 58 25 91 16 82
95 81 29 48  62 15 47 14 80 13
46 79 45 12  78 77 44 11 43 10
76 42 75 9   74 41 8  73 7  40
72 6  39 71  5  38 4  98 65 32
70 27 69 88  22 55 3  36 2  68
35 94 99 1   97 96 89 87 92 93
90 30 28 33  31 27 23 21 26 24
34 64 63 67  66 61 56 54 59 57
Re: WA#6 Help, please!!!
Posted by fruit_gzy 27 Aug 2008 12:45
When I used this test,I got the same answer as yours!!
At first,I thought we were right.
But if you see the answer carefully,you'll that 60 should be front of 84,and 84 should be in front of 17.so,we were both wrong.
Now I have got AC.I think you should pay attention to the link between the old and the young.
For example ,if 60 if older than 84,and 84 is older than 17,then ,60 is older than 17.It's what the test doesn't tell us but is important to the program.
Good luck!!

Edited by author 27.08.2008 12:45
Re: WA#6 Help, please!!!
Posted by lisang 2 Feb 2009 22:25
my programm have  20 21 22 23 24 25 26 27 29 31 32 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 19 18 17 16 28 89 90 91 92 93 15 94 95 96 97 14 13 12 11 10 9 8 7 6 5 4 3 2 1 98 99 100 30 33 34