Score : 800 points
Given are N pairwise distinct non-negative integers A_1,A_2,\ldots,A_N. Find the number of ways to choose a set of between 1 and K numbers (inclusive) from the given numbers so that the following two conditions are satisfied:
Input is given from Standard Input in the following format:
N K S T A_1 A_2 ... A_N
Print the answer.
3 3 0 3 1 2 3
2
The conditions are satisfied when we choose \{1,2\} or \{1,2,3\}.
5 3 1 7 3 4 9 1 5
2
5 4 0 15 3 4 9 1 5
3