Marks :10
: 4 | : 0
Your friend's birthday is nearby. He asked you to take care of balloon decoration. He has bought White and Yellow balloons of $$$N$$$ and $$$M$$$ quantities respectively. You have to decorate the balloons by placing the balloons in a straight line in any order. He likes a decoration when there are no more than $$$W$$$ white balloons placed successively and there are no more than $$$Y$$$ yellow balloons placed successively.
Your friend wants to know the number of decorations that are possible from given input such that he likes the decorations. Output the answer modulo $$$10^9+7$$$.
The first line of input consists of 4 space separated integers $$$-$$$ $$$N, M, W, Y$$$ $$$(1 \leq N, M \leq 100)$$$ $$$(1 \leq W, Y \leq 10)$$$
The output should consist of a single integer - the total number of possible decorations modulo $$$10^9 + 7$$$.
2 1 1 10
1
2 3 1 2
5
A line filled with balloons in any order is considered as a decoration.
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.