Oak is given N empty and non-repeatable sets which are numbered from 1 to N.Now Oak is going to do N operations. In the i-th operation, he will insert an integer x between 1 and M to every set indexed between i and N.Oak wonders how many different results he can make after the N operations. Two results are different if and only if there exists a set in one result different from the set with the same index in another result.Please help Oak calculate the answer. As the answer can be extremely large, output it modulo 998244353.
Oak is given N empty and non-repeatable sets which are numbered from 1 to N. Now Oak is going to do N operations. In the i-th operation, he will insert an integer x between 1 and M to every set indexed between i and N. Oak wonders how many different results he can make after the N operations. Two results are different if and only if there exists a set in one result different from the set with the same index in another result. Please help Oak calculate the answer. As the answer can be extremely large, output it modulo 998244353.