#P9858. Coldest City in Canada
Coldest City in Canada
Coldest City in Canada
Canada is cold in winter, but some parts are colder than others. Your task is very simple: given a list of cities and their corresponding temperatures, determine which city has the lowest temperature and is therefore the coldest. In case of a tie, output the city that appears first in the list.
inputFormat
The first line contains a positive integer n, representing the number of cities. Each of the following n lines contains a city's name and its temperature separated by space.
For example:
3 Toronto -5 Vancouver 0 Winnipeg -10
Note: Temperatures can be negative and are read as real numbers.
outputFormat
Output the name of the city with the lowest temperature.
sample
3
Toronto -5
Vancouver 0
Winnipeg -10
Winnipeg