Submission #00047


ソースコード

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 <bits/stdc++.h>
#define F first
#define S second
#define INF 1<<31
using namespace std;
typedef pair<int,int>P;
typedef pair<int,P>PP;
int main(){
int n,big,small,ans=0;
int p[11111];
while(1){
ans=0;
cin >> n >> small >> big;
if(n==0 && small==0 && big==0)break;
for(int i=0;i<n;i++){
cin >> p[i];
}
int cnt=0;
for(int i=small-1;i<big;i++){//最低人数から最大人数を計る
if(ans <= p[i]-p[i+1]){
ans=p[i]-p[i+1];
// cout << ans << endl;
cnt=i;
}
}
cout << cnt+1 << endl;
}
}

ステータス

項目 データ
問題 0001 - 入学試験
ユーザー名 ei1435
投稿日時 2016-03-30 13:58:08
言語 C++11
状態 Accepted
得点 10
ソースコード長 595 Byte
最大実行時間 19 ms
最大メモリ使用量 544 KB

セット

セット 得点 Cases
1 ALL 10 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
A1 AC 16 ms 476 KB
1
A2 AC 17 ms 444 KB
1
A3 AC 19 ms 544 KB
1
A4 AC 17 ms 520 KB
1