Submission #00076


ソースコード

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
include<bits/stdc++.h>
using namespace std;
int main(){
int m;
int n_min,n_max;
int ans=0;
while(1){
int c=0;
int max2=0;
cin >>m>>n_min>>n_max;
if(m==0 && n_min==0 && n_max==0)break;
int p[m+1];
int gap;
for(int i=0;i<m;i++){
cin >>p[i];
}
max2 = p[n_min-1]-p[n_min];
ans = n_min;
for(int i=n_min;i<=n_max;i++){
// for(int j=0;j<i;j++){
// cout <<p[i-1]<<p[i]<<endl;
gap=p[i-1]-p[i];
//cout <<gap<<endl;
if(max2 <= gap)ans = i;
// cout <<gap<<endl;
//c++;
}
cout << ans <<endl;
}
}

ステータス

項目 データ
問題 0001 - 入学試験
ユーザー名 ei1528
投稿日時 2016-03-30 14:46:00
言語 C++11
状態 Compile Error
得点 0
ソースコード長 601 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:1:1: error: ‘include’ does not name a type
 include<bits/stdc++.h>
 ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:11:5: error: ‘cin’ was not declared in this scope
     cin >>m>>n_min>>n_max;
     ^
./Main.cpp:30:3: error: ‘cout’ was not declared in this scope
   cout << ans <<endl;
   ^
./Main.cpp:30:17: error: ‘endl’ was not declared in this scope
   cout << ans <<endl;
                 ^

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #