Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
If the sum of the array is smaller than 2*k, then it is impossible to find a great partition.
Solve the reverse problem, that is, find the number of partitions where the sum of elements of at least one of the two groups is smaller than k.