|
|
back to board12Test Posted by fallen 17 May 2009 13:02 I've just got AC but with another solution. But I wonder, what is #12test? I tried: inp: 2 1 2 2 1 outp: 1 1 2 //------ inp: 0 outp: 0 PS I know, this test is incorrect. //------ inp: 4 1 4 2 8 3 6 5 7 outp: 2 1 4 5 7 First time I use list of segments. Algo: -find segment with max intersections -delete it from list And I do it while segment with max intersections have more then 0 intersections. Is it algo wrong? PS Sorry for my english. Re: 12Test I used the same algo and got WA12. I think this test is: 5 3 6 7 8 1 2 0 4 5 9 Answer: 3 1 2 3 6 7 8 |
|
|