-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC205A.java
More file actions
38 lines (31 loc) · 949 Bytes
/
Copy pathC205A.java
File metadata and controls
38 lines (31 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import java.io.*;
/**
* */
public class C205A {
/**
* @param args
*/
public static void main(String[] args){
try {
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in)); // STDIN
Integer nCities=Integer.valueOf(reader.readLine().trim());
String[] distances=reader.readLine().trim().split(" ",nCities);
Integer[] nDistances=new Integer[nCities];
Integer m=Integer.MAX_VALUE;
for(int i=0;i!=nCities;i++){
nDistances[i]=Integer.valueOf(distances[i].trim());
m=Math.min(nDistances[i],m);
}
Integer nCount=0;
int nId=0;
if(m>0){
for(int i=0;i!=nCities;i++)
if(nDistances[i].compareTo(m)==0){
nCount++;
nId=i+1; }}
System.out.println(((nCount.compareTo(1)==0)&&(nId!=0))?nId:"Still Rozdil");
}catch(Exception e){
e.printStackTrace(System.err);
}
}
}