109 - SCUD Busters

All about problems in Volume 1. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Pokemonster
New poster
Posts: 10
Joined: Mon Jul 01, 2002 11:15 pm
Location: Germany

Problem 109 - SCUD Busters

Post by Pokemonster »

Maybe someone can give me this information :D
The wall, eg. the polygon surrounding all the houses, should it be
convex ?
Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

Yes, it is obvious that it should be convex.
bjacoke001
New poster
Posts: 6
Joined: Fri Jul 26, 2002 6:42 pm

109

Post by bjacoke001 »

What are we supposed to do in the case of a shot on the perimeter of the kingdom? I'm getting WA and I can't find a bug anywhere in my code unless the shot is on one of the edges or vertices, which really complicates things. Thanks.

Brian
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post by .. »

Each SCUD missile (anitary leansing niversal estroyer) that lands within the walls of a kingdom destroys that kingdom's power plant (without loss of life).

Missile on bound doesn't destroy the power~~

Good luck~~
vivid
New poster
Posts: 6
Joined: Tue Jul 16, 2002 6:31 pm

Are there any tricky inputs in 109 - SCUD Busters ?

Post by vivid »

WA again & again, but my programm passes all my tests
seolv
New poster
Posts: 11
Joined: Wed Oct 24, 2001 2:00 am

109 - SCUD Busters

Post by seolv »

hi~

I am trying to solve this problem but I keep receiving WA.

I really don't know why my solution doesn't work.

In the problem description,

Each SCUD missile (anitary leansing niversal estroyer) that lands within the walls of a kingdom destroys that kingdom's power plant (without loss of life).

when missile launched at one of the points that compose of Convexhull,

the kingdom is not destroyed.. right? If the missile fired at the position of

power plant that is also a point composing of Convexhull, is the kingdom

destroyed?


my test input file and output are below. plz answer me.

12
3 3
4 6
4 11
4 8
10 6
5 7
6 6
6 3
7 9
10 4
10 9
1 7
5
20 20
20 40
40 20
40 40
30 30
3
10 10
21 10
21 13
10
100 101
200 195
143 199
111 200
107 154
132 102
101 223
110 155
118 107
102 148
-1
3 3
20 40
150 150

output
6961.00



12
3 3
4 6
4 11
4 8
10 6
5 7
6 6
6 3
7 9
10 4
10 9
1 7
5
20 20
20 40
40 20
40 40
30 30
3
10 10
21 10
21 13
10
100 101
200 195
143 199
111 200
107 154
132 102
101 223
110 155
118 107
102 148
-1
6 6
20 40
110 195

output
0.00
vivid
New poster
Posts: 6
Joined: Tue Jul 16, 2002 6:31 pm

Post by vivid »

As i understand kingdom's wall surrounds power plant.
It seems to me you don't include in kingdom. (The square of the last poligon must be greater than yours).
seolv
New poster
Posts: 11
Joined: Wed Oct 24, 2001 2:00 am

Post by seolv »

I found judge is wrong especially checking part of whether a point is in the convexhull or not.

I got accepted with a source code which outputs what it must not print

Additionally, the judge of problem 361(Cops and Robbers) is also wrong.
Ivan Golubev
Experienced poster
Posts: 167
Joined: Fri Oct 19, 2001 2:00 am
Location: Saint Petersburg, Russia

Post by Ivan Golubev »

Judge is OK for problems 109 and 361. If you have some examples of incorrect datas then post them here.
seolv
New poster
Posts: 11
Joined: Wed Oct 24, 2001 2:00 am

Post by seolv »

Try to input several positions of missiles launched on the lines composing convexhull.
vivid
New poster
Posts: 6
Joined: Tue Jul 16, 2002 6:31 pm

Post by vivid »

But do i need to include power plant into the kindom?
cyfra
Experienced poster
Posts: 144
Joined: Thu Nov 22, 2001 2:00 am
Location: Gdynia, Poland

Hi!

Post by cyfra »

Hi!

I am also trying to solve this problem...

I don't know what's wrong...

If SCUD hits the wall than is it counter as it hit the convex polygon or not ??

Could anyone who got AC tell me what is is output for this input:
4
0 0
1 1
1 0
0 1
4
10 10
20 10
20 20
10 20
-1
1 1
15 10
And could anyone give the right answers for seolv's inputs..

Thanks in advance :)
seolv
New poster
Posts: 11
Joined: Wed Oct 24, 2001 2:00 am

Post by seolv »

100.00 printed by accepted solution
zbogi
New poster
Posts: 15
Joined: Thu Aug 29, 2002 11:00 pm
Location: Bulgaria

a hint

Post by zbogi »

I also got AC, but my solution prints 0.00 on the last test posted.
So I think that it is counted to be hitten if the position is inside the walls,
not on a site.
Tsvetan Bogdanov.
from Brain Explorer - Sofia University - FMI 2
e-mail: zbogi@yahoo.com
cyfra
Experienced poster
Posts: 144
Joined: Thu Nov 22, 2001 2:00 am
Location: Gdynia, Poland

Hi!

Post by cyfra »

Hi!

After a few tries I also got AC....

I think that there are no test cases with points inside walls...

And that's good :D

Thanks to all and Good Luck :wink:
Post Reply

Return to “Volume 1 (100-199)”