Wrapper Function
function wrapper ( n , k , a ) { var sum = 0 ; for ( var i = 0 ; i < n ; i ++ ) sum += a [ i ] ; var dp = Array . from ( Array ( MAX ) , ( ) => Array ( MAX ) . fill ( - 1 ) ) ; return check ( 0 , sum , n , k , a , dp ) ; }