PROBLEM LINK:
Author:Anudeep Nekkanti
Tester:Sergey Kulik
Editorialist:Lalit Kundu
DIFFICULTY:
CHALLENGE
PROBLEM:
It is an interactive judge problem. You have a search area defined by n coordinate points that are present on the search area boundary. There is a point which you have to search for (that may or may not lie in the search area). You have m air-planes, which you can use. Each plane is defined by 3 variables (I, R, C). I is the unique id of the plane. R is the range it can transmit the special signal. C is the cost. You can use a plane to reach (x, y) which will cost 2*(x+y)*C, the judge will reply with "yes" or "no", depending on if the search point is within the R manhattan distance of (x, y).
EXPLANATION:
All the coordinates on the boundary are given in the input. And it is said that the whole search area can be enclosed in a 1024*1024 square. So we can actually shift the positions and always have x,y <1024. Now take the grid [1024][1024] and mark all boundary points. Now if you do a dfs from exterior point and stop on reaching marked points. you will end up marking all exterior points. So the unmarked points are interior points of search area. We can try all interior points, if we get the plane, we can report. if not we can report that it is out side.
To get better scores we can divide the 1024*1024 grid into smaller grids depending on available plane radius R, then query each of them, if we get an yes, then we can restrict our search to that area.
In contest, @mugurelionut and @aawisong, were able to pin point the exact positions by making assertions, hence they had the perfect score. All other scores are negligible considered to the perfect score, so every else had a score of 0.000.