Score : $500$ points
Find the number of sequences that satisfy all of the conditions below, modulo $998244353$.
A subsequence of a sequence is the result of removing zero or more elements from it and concatenating the remaining elements without changing the order. For example, $(10,30)$ is a subsequence of $(10,20,30)$, while $(20,10)$ is not a subsequence of $(10,20,30)$.
A longest increasing subsequence of a sequence is its strictly increasing subsequence with the greatest length.
Input is given from Standard Input in the following format:
$N$ $M$
Print the answer.
4 5
135
One sequence that satisfies the conditions is $(3,4,1,5)$.
On the other hand, $(4,4,1,5)$ do not, because its longest increasing subsequence has the length of $2$.
3 4
4
111 3
144980434
Find the count modulo $998244353$.