| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 31169 | 陈路垚 | 最长连号 | C++ | Wrong Answer | 40 | 0 MS | 256 KB | 373 | 2022-01-29 11:16:57 |
//洛谷能过(P1420),但是这里过不了 #include<bits/stdc++.h> using namespace std; int n,q,i,j,s=1,ans; int main(){ cin>>n>>q; if(n==1){ cout<<1; return 0; } for(i=2;i<=n;i++){ cin>>j; if(q<j&&j-q==1) s++; else s=1; if(s>ans) ans=s; q=j; } cout<<ans; return 0; }