| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 31788 | 陈万瑄 | 最长连号 | C++ | Wrong Answer | 50 | 0 MS | 256 KB | 275 | 2022-02-08 17:19:50 |
#include<bits/stdc++.h> using namespace std; int n,a[10001],t=1,ans; //int li_si_xian_ri_shan_ben int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(i==1) continue; if(a[i]-a[i-1]==1) t++; else t=1; ans=max(ans,t); } cout<<ans; return 0; }