Hi,Codeforces! I need your help!
There is a kind of integer sequence of length (n+k). (k<=n)
Constraints follow:
For every element in sequence, its value is either -1 or a positive integer.
The number of -1's occurrences is n and the number of positive integers's occurrences is k.
The sum of all positive integers equals n.
Any prefix sum of the sequence is non-negative.
Now you must calculate the number of different sequences satisfying the constraints above.
Is there a general formula for this answer? Most thanks.