HBC17440Generation I题解

天涯离梦残月幽梦 算法基础篇 46 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
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.

HBC17440Generation I题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC17440Generation I题解