Codeforces-SolutionsA/Codes/1829 B - Blank Spaces/1829B.cpp

28 lines
508 B
C++
Raw Normal View History

2023-06-08 00:31:31 +08:00
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i, n, t, count, ans;
cin >> t;
while (t--)
{
cin >> n;
int a[n];
ans = 0;
count = 0;
for (i = 0; i < n; i++)
{
cin >> a[i];
if (a[i] == 0)
{
count++;
}
else
{
ans= max(count,ans);
count= 0;
}
}
cout << max(count,ans) << endl;
}
}