0%

CodeForces 205A Little Elephant and Rozdil

读懂题就行,不用排序找一下最小的是不是多个

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
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;

int num[100005];
int main(){
int n;
///memset(b,0,sizeof(b));
scanf("%d", &n);
int flag = 0,cnt,Mini,Min = 1000000002;
for (int i = 0; i < n; i++){
scanf("%d", &cnt);
num[i] = cnt;
if (Min > cnt)
Mini = i;
//if (Min == cnt) flag = 1;
Min = min(cnt,Min);
}
for (int i = 0; i < n; i++)
{
if (Mini != i && Min == num[i])
flag = 1;
}
if (flag) printf("Still Rozdiln");
else printf("%dn", Mini + 1);
return 0;
}