Hero Goblin Techies in DOTA have two skills: Remote Mines - Plants a powerful mine that only detonates when triggered and Detonate - Detonates all remote mines at the same time.
A mine with power A will demage enemy r away from it 1000 * A / (r * r). And when all mines detonate at the same time, the demage to an enemy is the maximum of all the mines, that is maximus of 1000 * A[i] / (r[i] * r[i]).
Goblin Techies has plant many mines in the map, and Panda want to pass the dangerous region.
The region is square, with each side of length 100.0. The coordinate of the southwest corner is (x = 0, y = 0) and the coordinate of the northeast corner is (x = 100, y = 100).
The Panda will enter at (50, 0) and exit at (50, 100), and won't go out of the region in any other way.
Given the coordinates and powers of all mines in the region, what shound the Panda's HP be at least if Panda want to pass the region before he died? Assume Panda will choose the best path.