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 1112. Cover

12Test
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
Posted by Taras Vasylyshyn 4 Jul 2010 22:51
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