#P4048. [JSOI2010] 冷冻波
[JSOI2010] 冷冻波
Description
WJJ likes the game "Warcraft III." In the game, the Lich is a powerful hero whose skill Frozen Nova can kill exactly one sprite each time. We consider both liches and sprites as points on the plane.
If the Euclidean distance between a lich and a sprite does not exceed , and the lich's line of sight to that sprite is not blocked by any tree (that is, the line segment between the lich and the sprite has no common point with any tree), then the lich can instantly kill that sprite.
There are liches in the forest. After casting Frozen Nova, each lich must wait for a cooldown period before casting again. Different liches have different cooldowns and cast ranges, but each cast always kills exactly one sprite.
Starting from time , what is the minimum time needed to kill all the sprites?
Input Format
The first line contains three integers , , (), representing the number of liches, sprites, and trees.
The next lines each contain four integers , representing the coordinates, attack range, and casting interval (in seconds) of each lich.
The next lines each contain two integers , representing the coordinates of each sprite.
The next lines each contain three integers , representing the coordinates and radius of each tree.
All coordinates have absolute values at most ; radii and casting intervals are at most .
Output Format
Output one line: the minimum time (in seconds) needed to eliminate all sprites. If it is impossible to eliminate all sprites, output .
2 3 1
-100 0 100 3
100 0 100 5
-100 -10
100 10
110 11
5 5 10
5
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号