Codeforces Round 871 (Div. 4) |
---|

Finished |

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

implementation

*800

No tag edit access

The problem statement has recently been changed. View the changes.

×
B. Blank Space

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given a binary array $$$a$$$ of $$$n$$$ elements, a binary array is an array consisting only of $$$0$$$s and $$$1$$$s.

A blank space is a segment of consecutive elements consisting of only $$$0$$$s.

Your task is to find the length of the longest blank space.

Input

The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases.

The first line of each test case contains a single integer $$$n$$$ ($$$1 \leq n \leq 100$$$) — the length of the array.

The second line of each test case contains $$$n$$$ space-separated integers $$$a_i$$$ ($$$0 \leq a_i \leq 1$$$) — the elements of the array.

Output

For each test case, output a single integer — the length of the longest blank space.

Example

Input

551 0 0 1 040 1 1 11031 1 191 0 0 0 1 0 0 0 1

Output

2 1 1 0 3

Codeforces (c) Copyright 2010-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/30/2023 20:09:39 (j2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|