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 1069. Prufer Code

Why has the result must be sorted?
Posted by KALO 18 Jun 2009 02:44
for example for test: 8 7 4 6 3 6 8
my program writes:
1: 8
2: 7
3: 7 6
4: 5 6
5: 4
6: 4 3 8
7: 2 3
8: 1 6

which is correct, but i got WA#2

if i sort the result:
1: 8
2: 7
3: 6 7
4: 5 6
5: 4
6: 3 4 8
7: 2 3
8: 1 6

i get TL#5

i have got AC

Edited by author 18.06.2009 02:45

Edited by author 18.06.2009 05:09

Edited by author 18.06.2009 05:42