|
|
back to boardhelp??? tests??? i have tried this problem several years....while preparing for contests and it's always WA and it's not at all the heardest of problems..... i made an O (n log n) alg using heaps ....as usual it's WA at test 2 could someone put some tests around??? i ageve my self some and nothing....bad could somebody explain why??????????????: 1 2 3 2 3 my result: 1: 2 4 2: 1 3 6 3: 2 5 4: 1 5: 3 6: 2 AC result: 1: 2 4 2: 1 3 6 3: 2 5 4: 1 5: 1 //5 is not even conected to 1??????? 6: 3 Edited by author 13.10.2006 04:08 Edited by author 13.10.2006 04:40 Re: help??? tests??? Is this input legal? It seems that the last number will always be N, or the sequence itself is not legal. Re: help??? tests??? It's incorrect input, you cannot find a tree that satisfies your input i have tried this problem several years....while preparing for contests and it's always WA and it's not at all the heardest of problems..... i made an O (n log n) alg using heaps ....as usual it's WA at test 2 could someone put some tests around??? i ageve my self some and nothing....bad could somebody explain why??????????????: 1 2 3 2 3 my result: 1: 2 4 2: 1 3 6 3: 2 5 4: 1 5: 3 6: 2 AC result: 1: 2 4 2: 1 3 6 3: 2 5 4: 1 5: 1 //5 is not even conected to 1??????? 6: 3 Edited by author 13.10.2006 04:08 Edited by author 13.10.2006 04:40 |
|
|