CF205A.Little Elephant and Rozdil
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
The Little Elephant loves Ukraine very much. Most of all he loves town Rozdol (ukr. "Rozdil").
However, Rozdil is dangerous to settle, so the Little Elephant wants to go to some other town. The Little Elephant doesn't like to spend much time on travelling, so for his journey he will choose a town that needs minimum time to travel to. If there are multiple such cities, then the Little Elephant won't go anywhere.
For each town except for Rozdil you know the time needed to travel to this town. Find the town the Little Elephant will go to or print "Still Rozdil", if he stays in Rozdil.
小象非常热爱乌克兰。他最喜欢的城市是罗兹多尔(乌克兰语:“Rozdil”)。
然而,罗兹多尔居住起来十分危险,因此小象希望前往其他某个城市。小象不喜欢在旅途中花费太多时间,因此他会选择旅行所需时间最少的那个城市。如果存在多个这样的城市,则小象将哪儿也不去。
对于除罗兹多尔外的每个城市,你已知到达该城市的所需时间。请找出小象将前往的城市;若他仍留在罗兹多尔,则输出 "Still Rozdil"。
输入格式
The first line contains a single integer n (1 ≤ n ≤ 105) — the number of cities. The next line contains n integers, separated by single spaces: the i-th integer represents the time needed to go from town Rozdil to the i-th town. The time values are positive integers, not exceeding 109.
You can consider the cities numbered from 1 to n, inclusive. Rozdil is not among the numbered cities.
第一行包含一个整数 n(1≤n≤105)—— 城市的数量。
下一行包含 n 个用单个空格分隔的整数:其中第 i 个整数表示从 Rozdil 镇前往第 i 个城镇所需的时间。所有时间值均为正整数,且不超过 109。
你可以将这些城市编号为 1 至 n(含端点)。Rozdil 镇本身不在该编号范围内。
输出格式
Print the answer on a single line — the number of the town the Little Elephant will go to. If there are multiple cities with minimum travel time, print "Still Rozdil" (without the quotes).
在一行中输出答案——小象将前往的城市编号。如果存在多个具有最小旅行时间的城市,则输出 "Still Rozdil"(不带引号)。
输入输出样例
输入#1
2 7 4
输出#1
2
输入#2
7 7 4 47 100 4 9 12
输出#2
Still Rozdil
说明/提示
In the first sample there are only two cities where the Little Elephant can go. The travel time for the first town equals 7, to the second one — 4. The town which is closest to Rodzil (the only one) is the second one, so the answer is 2.
In the second sample the closest cities are cities two and five, the travelling time to both of them equals 4, so the answer is "Still Rozdil".
在第一个样例中,小象只能前往两座城市。到达第一座城市的旅行时间为 7,到达第二座城市的旅行时间为 4。离罗吉尔(唯一的一个)最近的城市是第二座,因此答案为 2。
在第二个样例中,最近的城市是第二座和第五座城市,到达这两座城市的旅行时间均为 4,因此答案为 “Still Rozdil”。
输入解题思路,AI测评打分。不知道怎么写?