A8612 | Little Elephant and Rozdil
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
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.
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.
输入格式
The first line contains a single integer $n$ $(1<=n<=10^{5})$ — 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 $10^{9}$ .
You can consider the cities numbered from $1$ to $n$ , inclusive. Rozdil is not among the numbered cities.
You can consider the cities numbered from $1$ to $n$ , inclusive. Rozdil is not among the numbered cities.
输出格式
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).
输入输出样例
输入 #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".
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".
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted