Having developed a COVID-19 vaccine, CodeVax gives you one final assignment: Deliver the CodeVax vaccine to cities around the world.
More specifically, the planet Earth has a radius of a b
is defined as the shortest distance between the two points by travelling on the surface of planet Earth. Each city has
Wanting to help the most people, you decide you will deliver the CodeVax vaccines to the city with the highest number of active COVID-19 cases you can reach, while still getting to an airport strictly before -1
if you can't reach an airport under
Input Specification
The first line of input will contain the positive integers
The next line will contain
The next
The next
Output Specification
Output the number of active COVID-19 cases of the most infected city you can reach while reaching a city that has an airport. If you are unable to reach any airport strictly before -1
.
Constraints
You may visit any road and/or city multiple times. All
Sample Input 1
3 3 3 7 2
2 3
0 -2.5000000000 0.0000000000 1.6583123952
1 1.5000000000 2.0000000000 1.6583123952
2 0.0000000000 0.0000000000 -3.0000000000
1 2
2 3
1 3
Sample Output 1
2
Explanation for Sample 1
You can travel directly to city
Sample Input 2
3 3 3 6 2
2 3
0 -2.5000000000 0.0000000000 1.6583123952
1 1.5000000000 2.0000000000 1.6583123952
2 0.0000000000 0.0000000000 -3.0000000000
1 2
2 3
1 3
Sample Output 2
1
Explanation for Sample 2
You cannot travel to city
Comments