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.
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).
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.
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).
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