这个和错误下载的输出一样啊???
#include<iostream>
using namespace std;
int arr[10001];
int main() {
int n,lmax = 1,len = 1;
cin>>n;
for(int step = 0; step < n; step++) {
cin>>arr[step];
}
for(int step = 0; step < n; step++) {
if(arr[step] == arr[step - 1] + 1) {
len++;
}
else len = 1;
if(len > lmax){
lmax = len;
}
}
cout<<lmax;
return 0;
}