An element will occur ' powa ' times in total of which ' powla ' times it will be last element and ' powfa ' times it will be first element
ll powa = C [ n - 1 ] [ k - 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { ll powla = C [ i ] [ k - 1 ] ; ll powfa = C [ n - i - 1 ] [ k - 1 ] ;