Skip to content

Commit fd8fd94

Browse files
committed
Added 1829B - Blank Space.cpp
1 parent 86d0e08 commit fd8fd94

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

1829B - Blank Space.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
#define ll long long
5+
6+
// Code Written By: Vikash Patel
7+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8+
9+
int main()
10+
{
11+
int t;
12+
cin>>t;
13+
while(t--)
14+
{
15+
int n;
16+
cin>>n;
17+
int a[n];
18+
int maxi = 0;
19+
int c = 0;
20+
for(int i=0; i<n; i++)
21+
{
22+
cin>>a[i];
23+
if(a[i]==0)
24+
{
25+
c++;
26+
maxi = max(maxi,c);
27+
}
28+
else
29+
{
30+
c = 0;
31+
}
32+
}
33+
cout<<maxi<<endl;
34+
}
35+
return 0;
36+
}

0 commit comments

Comments
 (0)