You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 1552D.go
    path of file: ./repos/codeforces-go/main/1500-1599
    
    the code of the file until where you have to start completion: package main

import (
	. "fmt"
	"io"
)

/*
由于 j 和 k 没有顺序关系
我们可以将 a 中的部分元素取反，记其为 a'
设 b[0]=0，构造 b 为 a'[:n-1] 的前缀和
若 a'[:n-1] 中存在一个子区间，其区间和等于 a'[n-1]
由
    
func CF1552D(in io.Reader, out io.Writer) {
	var T, n int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		a := make([]int, n)
		for i := range a {
			Fscan(in, &a[i])
		}
		has := map[int]bool{}
		for i := 0; i < 1<<n; i++ {
			sum := 0
			for j, v := range a {
				sum += i >> j & 1 * v
			}
			has[sum] = true
		}
		if len(has) < 1<<n {
			Fprintln(out, "YES")
		} else {
			Fprintln(out, "NO")
		}
	}
}