Function to sum of all subsets of a given array
static void subsetSum ( Vector < Integer > c ) { int L = c . size ( ) ; int mul = ( int ) Math . pow ( 2 , L - 1 ) ; for ( int i = 0 ; i < c . size ( ) ; i ++ ) ans += c . get ( i ) * mul ; }