Description
After successive failures in the battles against the Union, the Empire
retreated to its last stronghold. Depending on its powerful defense
system, the Empire repelled the six waves of Union’s attack. After
several sleepless nights of thinking, Arthur, General of the Union,
noticed that the only weakness of the defense system was its energy
supply. The system was charged by N nuclear power stations and
breaking down any of them would disable the system.The general soon started a raid to the stations by N special agents
who were paradroped into the stronghold. Unfortunately they failed to
land at the expected positions due to the attack by the Empire Air
Force. As an experienced general, Arthur soon realized that he needed
to rearrange the plan. The first thing he wants to know now is that
which agent is the nearest to any power station. Could you, the chief
officer, help the general to calculate the minimum distance between an
agent and a station?Input
The first line is a integer T representing the number of test cases.
Each test case begins with an integer N (1 ≤ N ≤ 100000). The next N
lines describe the positions of the stations. Each line consists of
two inte
poj3714 Raid
最新推荐文章于 2023-02-03 09:12:51 发布