ProblemStatement 5
ProblemStatement 5
Mr. Steve has booked R number of rooms for guests in a 5-star hotel on the occasion
of his daughter’s wedding. There are G number of guests from the side of the groom and B
number of guests from the side of the bride including Mr. Steve. Your task is to
accommodate all the guests in R rooms so that -
- Every room has at least one guest and at most 100.
- No room has the guests from both sides. In other words, a room can be shared
by the guests either only from the groom's side or only from the bride's side, not
both.
- Guests from bride’s cannot have one’s separate room, i.e. they must share a
room.
Print the number of ways this can be done when all rooms are identical but not the guests.
Considering the required number can be huge, print the number modulo 998,244,300.
INPUT :
- First line of input contains an integer T, denoting the number of test cases. Each test
case has the following description.
- First & only line of each test will have three space separated integers R, G, and B,
denoting no. of rooms, no. of guests from the side of the groom and the bride
respectively.
OUTPUT :
- For each test case, print a single line with a single integer denoting the number of
ways modulo 998,244,300.
CONSTRAINTS :
● 1 <= T <= 100
● 1 <= R, G, B <= 100
- Time limit per test = 1 sec
- Source Limit = 50 MBytes
- I/O = Standard I/O
SAMPLE INPUT :
4
214
244
254
284
SAMPLE OUTPUT :
0
3
10
609
EXPLANATION:
-Test #3 results in 3 because there exist three possible ways to to accomodate
guests.
● {GroomSide 1}, {GroomSide 2}, {BrideSide 1, BrideSide 2}, {BrideSide 3, BrideSide 4}