Number of ways of dividing an array into 2 parts such that sum of each part is > k

Правка en1, от DaviddeGea1, 2019-10-27 11:54:36

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

Теги #combinatorics, maths, #modular arithmetic

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский DaviddeGea1 2019-10-27 12:01:03 99
en1 Английский DaviddeGea1 2019-10-27 11:54:36 565 Initial revision (published)