10078 - The Art Gallery
Moderator: Board moderators
-
- Experienced poster
- Posts: 161
- Joined: Tue Oct 25, 2005 8:38 pm
- Location: buet, dhaka, bangladesh
thats right mf, i also noticed that lately, i missed checking the 2nd point and got wa, after checking that point i got accepted. anyhow, the judge doesn't give such critical inputs(as tan_yui said, closed area inside the whole area). so checking cw/ccw or convex hull, both can solve the problem. thanks to mf and tan_Yui for their good reply.
ishtiak zaman
----------------
the world is nothing but a good program, and we are all some instances of the program
----------------
the world is nothing but a good program, and we are all some instances of the program
Re: 10078 tests
I got the same answers, and I got WA.diac_paul wrote:Can anyone give me some data tests so I can find my mistake? For exemple what should be the output for this test:
7
3 0
6 1
7 5
5 8
3 8
2 7
2 6
8
3 0
6 1
7 5
5 8
3 8
2 7
2 6
1 5
6
3 1
5 6
4 6
3 7
2 6
1 6
5
1 1
1 5
3 5
6 7
9 5
3
1 1
2 2
2 0
4
0 0
0 1000
500 501
1000 0
4
0 0
0 1000
500 499
1000 0
0
?
I get "No Yes Yes Yes No No Yes" ( ofcourse, with breaklines ).
Is this correct? I think it's rigth. Does anybody knows some other tricky tests?
Since the problem says the co-ordinates are given in order, I can safely assume the polygon is a simple polygon, can't I?
-
- Experienced poster
- Posts: 196
- Joined: Wed May 02, 2007 10:12 pm
- Location: Hungary, Pest county, Halasztelek
- Contact:
Re: 10078 - The Art Gallery
This problem is NOT a convex hull finding task. The points are sorted, as described in the problem statement.
[my AC solution haven't used a convex hull algorithm].
[my AC solution haven't used a convex hull algorithm].
Re: 10078 - The Art Gallery
This problem can be solve by finding convex hull. My AC program uses convex-hull algorithm and it performs well.