A die simulator rolls a die with
You are given an integer n and an integer array rollMax of length rollMax[i] specifies the maximum number of consecutive times the face
Return the total number of distinct valid sequences of length n that can be generated. Since the answer may be very large, return it modulo
Note: Two sequences are considered distinct if they differ at at least one position.
Constraints:
n
rollMax.length
rollMax[i]
A die simulator rolls a die with
You are given an integer n and an integer array rollMax of length rollMax[i] specifies the maximum number of consecutive times the face
Return the total number of distinct valid sequences of length n that can be generated. Since the answer may be very large, return it modulo
Note: Two sequences are considered distinct if they differ at at least one position.
Constraints:
n
rollMax.length
rollMax[i]