Пример #1
0
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;
}
Пример #2
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");
}