Untitled

mail@pastecode.io avatar
unknown
plain_text
10 months ago
467 B
2
Indexable
Never
// ottepel
#include <iostream>
using namespace std;
int main()
{
    int a;
    cin >> a;
    int b = 0;
    int y = 0;
    int max = 0;
    while (a > 0)
    {
        cin >> b;
        a -= 1;
        if (b > 0)
        {
            y += 1;
            if (y >= max)
            {
                max = y;
            }
        }
        if (b <= 0)
        {
            y = 0;
        }
    }
    cout << "\n" << max;
    return 0;
}