|
From Sky: Hi I'm a Student and i'll try my best to state the problem perfectly.
The number of non-decreasing sequences of size at least 1 and at most N,
such that each element of the sequence lies between L and R, both inclusive.
Eg:- N=1 L=4 R=5
ans= 2. [{4},{5}]
N=3 L=4 R=6
ans= 19. [{4},{5},{6},{4,4},{4,5},{4,6},{5,5},{5,6},{6,6}
{4,4,4},{4,4,5},{4,4,6},{4,5,5},{4,5,6},{4,6,6},{5,5,5},{5,5,6},{5,6,6}
,{6,6,6}] Answered by Claude Tardif. |