I got this problem in an off-campus round, someone please help me solve the problem:
You are given N elements, each having unique values. If you distribute them among 2 children in such a way that the total unique value that each child receives must be greater than K. How many ways can you distribute the elements so that the mentioned condition holds true?
Since the answer can be very large print it modulo 1e9+7.
1 <= N <= 10^3
1 <= K <= 10^5
1 <= A[i] <= 10^9