Description

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.

Input

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.

Output

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).

Examples
input
2
7 4
output
2
input
7
7 4 47 100 4 9 12
output
Still Rozdil
Note

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".

题意:告诉你一些时间,让你去寻找最小时间序号,如果存在多个结果,则输出:still Rozdil

解法:模拟,题意告诉你了

#include<stdio.h>
int main()
{
int n;
int a[100010];
long long min;
int i,d;
int m,q,e;
while(~scanf("%d",&n))
{
e=0;
scanf("%d",&d);
min=d;
for(i=1;i<n;i++)
{
scanf("%d",&a[i]);
if(a[i]<min)
{
min=a[i];
m=i;
e=0;
}
else if(a[i]==min)
{
e=1;
}
}
if(e)
printf("Still Rozdil\n");
else if(e==0)
{
if(min==d)
printf("1\n");
else
printf("%d\n",m+1);
}
}
}

  

Codeforces Round #129 (Div. 2) A的更多相关文章

  1. Codeforces Round #129 (Div. 2)

    A. Little Elephant and Rozdil 求\(n\)个数中最小值的个数及下标. B. Little Elephant and Sorting \[\sum_{i=1}^{n-1}{ ...

  2. 字符串(后缀自动机):Codeforces Round #129 (Div. 1) E.Little Elephant and Strings

    E. Little Elephant and Strings time limit per test 3 seconds memory limit per test 256 megabytes inp ...

  3. Codeforces Round #129 (Div. 1)E. Little Elephant and Strings

    题意:有n个串,询问每个串有多少子串在n个串中出现了至少k次. 题解:sam,每个节点开一个set维护该节点的字符串有哪几个串,启发式合并set,然后在sam上走一遍该串,对于每个可行的串,所有的fa ...

  4. Codeforces Round #129 (Div. 2) C

    Description The Little Elephant very much loves sums on intervals. This time he has a pair of intege ...

  5. Codeforces Round #129 (Div. 2) B

    Description The Little Elephant loves sortings. He has an array a consisting of n integers. Let's nu ...

  6. Educational Codeforces Round 129 (Rated for Div. 2) A-D

    Educational Codeforces Round 129 (Rated for Div. 2) A-D A 题目 https://codeforces.com/contest/1681/pro ...

  7. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  8. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  9. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

随机推荐

  1. Bootstrap CSS教程

    Bootstrap 教程 Bootstrap,来自 Twitter,是目前最受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加 ...

  2. 清理:db上面的过期的binlog,释放磁盘空间。 (转)

    如果10台以内的db的话,自己手动ssh进去,clean就足以,但是上百台呢,就要写脚本了.大概思路:在 一台db跳转机上面, 写一个脚本,访问slave,远程获取正在复制的master上面的binl ...

  3. 【转】 Pro Android学习笔记(六二):Preferences(6):header

    目录(?)[-] 代码实现 header xml文件 在前面的例子,我们主要学习了PreferenceScreen的xml如何写,preference有哪些类型.在代码中,我们为了不提示warning ...

  4. Java 的 Tuple 元组数据类型

    元组类型,即 Tuple 常在脚本语言中出现,例如 Scala 的 ("Unmi", "china@qq.com", "blahbla"). ...

  5. mysql主从服务器复制原理

    在实际企业应用环境当中,单台mysql数据库是不足以满足日后业务需求的.譬如服务器发生故障,没有备份服务器来提供服务的话,业务就得停止.介于这种情况,我们来学习一下mysql主从复制. 将Mysql的 ...

  6. CSS 布局_如何实现容器中每一行的子容器数量随着浏览器宽度的变化而变化?

    实现一个浮动布局,红色容器中每一行的蓝色容器数量随着浏览器宽度的变化而变化,就如下图: 要实现这样一个布局,我们首先需要如下的 HTML: <div id="float-contain ...

  7. unreal3启动地图设置

    在defaultengine.ini中[URL]节: Map=MOBATinyMap.udkLocalMap=MOBATinyMap.udk 这里有Map和LocalMap两个属性,让人有点混淆,只好 ...

  8. sklearn实现聚类

    import numpy as np from sklearn import datasets from sklearn.cross_validation import train_test_spli ...

  9. Servlet的一些细节

    由于客户端是通过URL地址访问web服务器的中的资源的,所以Servlet程序若想被外界访问,必须把servlet程序映射到一个URL地址上,这个工作在web.xml文件中使用<servlet& ...

  10. ES Docs-2:Exploring ES cluster

    The REST API Now that we have our node (and cluster) up and running, the next step is to understand ...