The International Unfair Programming Contest (IUPC) is a competition for cheating skills. In this competition, participants are required to solve as many problems as possible by cheating without drawing
suspicion\textit{suspicion}suspicion. As is known to all, Nan Xiang Institute of Science and Technology (NXIST) is one of the best cheaters in IUPC. They shot to fame by winning the gold medal in the IUPC Ningxia Railway Station, Yinchuang Site held in May 2020, where they successfully solved 6 problems.
You are the leader of IUPC team in NXIST, and your team is going to participate in IUPC Silk-Road Contest next week. There are
nnn problems in this contest, and participants have
ttt minutes to solve them. As a master cheater, you already know how to steal solutions submitted by others, so all your team need is to submit the stolen solutions without drawing
suspicion\textit{suspicion}suspicion during the contest. Precisely, if problem
iii is first solved by other team at the
xix_ixi-th minute of the contest, your team will steal the solution
immediately\textbf{immediately}immediately and can submit it
exactly once\textbf{exactly once}exactly once at any time before the contest ends. However, to avoid
suspicion\textit{suspicion}suspicion, you set the following rules for your team:
-
Your team can submit at most one solution in each minute.
-
For every kkk-minute time interval [x,x+k−1][x, x+k-1][x,x+k−1] (x≥1, x+k−1≤t)(x\ge 1,~ x+k-1\le t)(x≥1, x+k−1≤t) in the contest, your team can submit at most mmm solutions. Here kkk and mmm are given numbers.
Now you can predict the exact moment when each problem will be solved by other teams, that is, you know when your team can get the solution to each problem. Please calculate the number of different plans for your team to solve
all\textbf{all}all problems without drawing
suspicion\textit{suspicion}suspicion. Formally, a plan can be denoted as a sequence
a1, a2, ..., ata_1,\ a_2,\ ...,\ a_ta1, a2, ..., at, where
ai=pa_i=pai=p if your team submits the solution to problem
ppp in the
iii-th minute, or
ai=0a_i=0ai=0 if your team does nothing in the
iii-th minute. Two plans are different if the sequences are different.