Submission #00027
ソースコード
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>> using namespace std; int main(){ while (1){ int m; int nmin,nmax; int p[201]; int ans=-1; int ansp=-1; int mae=-1; //memset(p,-1,sizeof(p)); scanf ( "%d %d %d" ,&m,&nmin,&nmax); if (m == 0 && nmin == 0 && nmax==0){ break ; } for ( int i=0;i<m;i++){ scanf ( "%d" ,&p[i]); } for ( int i=nmin;i<=nmax;i++){ mae=ans; ans=p[i-1]-p[i]; if (mae <= ans){ ansp = i; } } printf ( "%d\n" ,ansp); } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0001 - 入学試験 |
ユーザー名 | ei1437 |
投稿日時 | 2016-03-30 13:28:01 |
言語 | C++ |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 537 Byte |
最大実行時間 | 15 ms |
最大メモリ使用量 | 472 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
A1 | WA | 15 ms | 472 KB |
1
|
A2 | WA | 11 ms | 452 KB |
1
|
A3 | WA | 13 ms | 428 KB |
1
|
A4 | WA | 14 ms | 408 KB |
1
|