Driver Code
int main ( ) { int A [ ] = { 12 , 11 , 10 , 13 } ; int B [ ] = { 7 , 10 , 6 , 2 } ; int N = sizeof ( A ) / sizeof ( A [ 0 ] ) ; int K = 3 ; if ( checkSubsetSum ( A , B , N , K ) ) { cout << " YES " ; } else { cout << " NO " ; } return 0 ; }