Dhoni has 3 types of water bottles. He has exactly bottles of volume 0.5 liters, bottles of volume 1 liter, and bottles of volume 2 liters. Your task is to help Dhoni count the number of ways to carry exactly liters of water. Two variants are different from each other only if they differ in the number of bottles of at least one kind.
The first line will contain four integers — .
Print one number — the solution to the problem. If it is not possible to make exactly liters of water, print .
10 5 5 5
3 0 0 2
Login to submit
First of all, we will generate all possible combinations of “aaa”(0.50.50.5-liter bottle) and “bbb”(...