s
to keep track of unique dice rolls.res
to 1, representing the minimum length of sequence that cannot be taken.rolls
.
a. Add the current roll to the set s
.
b. If the size of s
equals k
, increment res
and clear s
to start counting for the next set.res
as the result.