#include <iostream>
#include <algorithm>
#include <vector> using namespace std; int main(){
int n;
cin >> n;
vector<int> a(n);
for(int i = ; i < n; ++ i)
cin >> a[i];
int maxlen = ;
if(n == ) maxlen = ;
else if(n == ) maxlen = ;
else{
maxlen = ;
int l = , r =;
for(int i = ; i < n; ++ i){
if(a[i] == a[i-] + a[i-]){
r = i;
if(maxlen < r-l+){
maxlen = r-l+;
}
}
else{
l = i-;
}
}
}
cout<<maxlen<<endl;
return ;
}
相关文章
- 10-26Codeforces Round #369 (Div. 2) B. Chris and Magic Square 水题
- 10-26【分类讨论】【set】Codeforces Round #407 (Div. 2) B. Masha and geometric depression
- 10-26Codeforces Round #352 (Div. 2) B. Different is Good 水题
- 10-26Codeforces Round #626 (Div. 2, based on Moscow Open Olympiad in Informatics)/CF1323 B. Count Subrect
- 10-26B. Pairs---快速暴力解法---Codeforces Round #562 (Div. 2)
- 10-26Codeforces Round #394 (Div. 2) B. Dasha and friends 暴力
- 10-26Codeforces Round #286 (Div. 2) B. Mr. Kitayuta's Colorful Graph (二维并查集)
- 10-26Educational Codeforces Round 89 (Rated for Div. 2)---B. Shuffle(1300分)
- 10-26Codeforces Round #252 (Div. 2) B. Valera and Fruits(模拟)
- 10-26Codeforces Round #371 (Div. 2) B. Filya and Homework 水题