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. Anthem.NET 的回调流程图

    下面用一个最简单的 anthem:Button 回调作为例子,理清回调过程中执行函数的次序.代码如下: <%@ Page Language="C#" AutoEventWir ...

  2. Erlang generic standard behaviours -- gen_server system msg

    这是Erlang generic standard behaviors gen_server 分析的系列的最后一篇,主要分析gen_server module 辅助性的功能函数. 在gen_serve ...

  3. zk 02之 Windows安装和使用zookeeper

    本文介绍的 Zookeeper 是以 3.4.5 这个稳定版本为基础,最新的版本可以通过官网 http://hadoop.apache.org/zookeeper/来获取,Zookeeper 的安装非 ...

  4. winfrom实现控件全屏效果

    用常规方法实现全屏显示时,由于采用的三方控件导致界面顶端一直有一条半透明的类似标题栏的东西无法去除,原因一直没找到. 下面综合整理下网上两位博主的用WindowsAPI实现全屏的方法: 控件全屏显示: ...

  5. VC 绘图,使用双缓冲技术实现

    VC 绘图,使用双缓冲技术实现 - Cloud-Datacenter-Renewable Energy-Big Data-Model - 博客频道 - CSDN.NET VC 绘图,使用双缓冲技术实现 ...

  6. JConsole远程监控配置

    首先,看本机(Windows)安装了JRE没 Win > CMD 打开命令窗口 如有安装,则会显示以下版本信息:若没有显示,就安装吧 C:\Users\Administrator>java ...

  7. 19E Fairy

    Once upon a time there lived a good fairy A. One day a fine young man B came to her and asked to pre ...

  8. webAPI路由的使用

    根据WEBAPI的路由规则,在实际项目当中有二种用法, 一:webAPI.Config里面为 config.MapHttpAttributeRoutes(); config.Routes.MapHtt ...

  9. sql获取当日减去几天的几天前日期

    CONVERT(varchar(10),DATEADD(DAY, -220 ,CONVERT(nvarchar(10),getdate(),23)),23)

  10. 20170527关于Thingking in Java

    由于工作上的需求,要开始学习Android开发,所以先开始看一些Java方面的知识.学习从Thingking in Java开始,看了一下第一张,感觉真的是一本好书,希望自己努力把他看完,加油! 第一 ...