$$x_1+x_2+...+x_p+y_1+y_2+...+y_q \ge X$$ where $$x_1,x_2..x_p, y_1,y_2..y_q$$ are all non-negative integers, $$x_1..x_p\le a$$ $$y_1...y_q\le b?$$
The original problem is "You are given $N$ distinct boxes of marbles in total. There are $P$ boxes each containing $A$ number of marbles and remaining $Q$ boxes contains $B$ number of marbles each. Given a number $X$, you have to find total the number of ways in which you can pick at least $X$ marbles from the boxes. Print total number of ways modulo $1000000007$". or in other words how many solutions are there for the above LPP. I am completely lost here,any mathematical relations or approaches are welcome.Also guidance in efficiently coding the solution approach is also needed.Thank you!