Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
179 B
1
Indexable
Never
#include <iostream>
using namespace std;

int main (){
int a,b,j=0,k=0;
cin >>a;
for (int i=0;i<a;i++){
cin>>b;
if (b>0)
j++;
else
j=0;
if(j>k)k=j;
};
cout << k ;
}