T = int(input()) assert 1 <= T <= 2000 for _ in range(T): n = int(input()) assert 1 <= n <= 60 f = list(map(int,input().split())) for i in range(n): assert 0 <= f[i] <= 1