void testBalancePar(){ int value[] = {12,5,7,3}; int n = sizeof(value)/sizeof(value[0]); vector<int> v(value, value+n); cout << BalancedPartition(v); // return 0; }
int main() { int t,n,i; scanf("%d",&t); while(t--) { scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("%d",BalancedPartition(a,n)); } scanf("%d"); }