Function to sum of all subsets of a given array
static void subsetSum ( List < int > c ) { int L = c . Count ; int mul = ( int ) Math . Pow ( 2 , L - 1 ) ; for ( int i = 0 ; i < c . Count ; i ++ ) ans += c [ i ] * mul ; }