RETO4M11 - 4RETO 11 MARATÓN
The little elephant loves his land very much. His greatest love is in the village of "Mogotes" However, Mogotes is small, so the little elephant wants to go to some other city. The little elephant does not like spending a lot of time travelling, so for the trip he is to choose a city that needs a minimum time to arrive. If there are multiple cities with the same condition, the little elephant will not travel.
For each village, except Mogotes, we know the time to travel to this city. Output the index of the city that the little elephant will travel to, or print "me quedo en mogotes" if he stays in Mogotes.
Input
The first line contains an integer n (1 ≤ n ≤ 105) - the number of cities. The next line contains n integers, separated by spaces: the i-th integer represents the time required to go from village Mogotes to the i-th city. Time values are positive integers, not exceeding 109.
You can consider the cities numbered 1 through n, inclusive.
Output
Print the answer in a single line - the number of the city that the little elephant will visit. If there are multiple cities with the same minimum travel time, print "me quedo en mogotes" (without the quotes).
In the first example there are only two cities where the little elephant can go. The travel time to the first city equals 7, the second is 4. Mogotes nearest city is the second, so the answer is 2.
In the second example the nearest cities are the cities of two and five, the travel time to both is 4, so the answer is "me quedo en mogotes".
Example
Input: 2 7 4 Output: 2
Input: 7 7 4 47 100 4 9 12 Output: me quedo en mogotes
Added by: | MARATON AFDM |
Date: | 2015-09-28 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU JS-MONKEY |