Submission #00005


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<bits/stdc++.h>
using namespace std;
int main(){
int m, nmin, nmax, p[300], nnum = 0, n = 0;
while(1){
nnum = 0;
n = 0;
cin >> m >> nmin >> nmax;
if(m == 0 && nmin == 0 && nmax == 0) break;
for(int i = 0; i < m; i++) cin >> p[i];
while(nmin <= nmax){
if(p[nmin-1] - p[nmin] >= nnum){
nnum = p[nmin-1] - p[nmin];
n = nmin;
}
nmin++;
}
//cout << nnum << endl;
cout << n << endl;
}
}

ステータス

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

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
A1 AC 17 ms 476 KB
1
A2 AC 18 ms 712 KB
1
A3 AC 16 ms 560 KB
1
A4 AC 15 ms 408 KB
1