HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50145 - Close City

Section problems

• 50053 - kth Permutation
• 50070 - Number of Chairs
• 50073 - Missing Number
• 50077 - Valid Permutations
• 50079 - Fun Fair
• 50089 - Sum of Cubes
• 50118 - Car Parking
• 50139 - Multiplication Table - 2
• 50145 - Close City
• 50149 - Albanian Airlines
• 50150 - Divisible by m
• 50159 - Triangular Numbers
• 50162 - Mersenne prime
• 50164 - The roots of a quadratic eq...
• 50172 - Permutations and Combinat...
• 50192 - Nr of Missing Guests
• 50198 - Euro to Leke

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Close City

Question: You can find Epoka University on the map using

  • Decimal Deg. Latitude: 41.404974
  • Decimal Deg. Longitude: 19.705841
You are asked to find Euclidean distance of some cities. You will be given Latitude and Longitude coordinates of a city and then, two other cities. Find the closer city to the first one.

Input specification
You will be given a string (city name) and two floating point numbers (Latitude and Longitude coordinates of each city) in three lines where (W/E) -180 ≤ Longitude ≤ 180 and (S/N) -90 ≤ Latitude ≤ 90. And, city name is not longer than 15 characters and contains only English letters (no special characters).

Output specification
Show the name of the closer city.

 Sample Input I     Sample Output I   
 Tirana 41.328114 19.818338
 Durres 41.313835 19.446037
 Kruje 41.506900 19.793683
 Kruje


Для отправки решений необходимо выполнить вход.

www.contester.ru