Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
353 B
1
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
    int a, c =0, max=0;
    for(int i = 0; i <5 ; i++)
    {
        for(int b = 0; b <5 ; b++)
        {
            cin >> a;
            if (a == 1)
            {
                c++;
            }
            if(c> max) max = c;
            if (b == 4) c=0;
        }
    }
    cout << max;
}