Today is the wedding of Mr.Lin good friend YGC. Mr.Lin went to the store to prepare a gift for YGC. As the best friend of Mr.Lin, It is impossible for Mr.Lin bought only one gift to YGC. So Mr.Lin suddenly had a strange thought in his mind:”I want to buy n gifts to YGC”. But Mr.Lin doesn't know what YGC likes about the m items in this store. Then Mr.Lin will bought n pieces of gifts from the m kinds of gifts gift to YGC.Now we define that YGC has a value for the likes of these m items. We define the favorite situation of YGC for those gift bought by Mr.Lin is ( means the number that the i-th item is selected, and can be 0), now Mr.Lin is rushing to take the train to participate in the YGC wedding, so he takes pieces for each item and then goes to Train. Now we want to know the mathematics expectation of YGC’s favorite situation for Mr.Lin’s gifts.Maybe the answer is lager enough, you can only tell us the answer modulo 998244353.
从m种物品中任意挑选一共n件物品并且方案不相同所能获得得权值对应的数学期望。
对方案数不同定义如下:如果m种物品的对应的选取个数有一种不相同就是不相同
对权值的定义如下(pi表示第i种物品选取了pi个,vi表示第i种物品的权值)
There multiple test cases in the input, each test case contains two lines
First line of input contains two positive integers n, m (n,m<=1e5,∑n,∑m<=1e5)
and next line contain m integers () separated by a single space mentioned in the description.
For every test case, output one single line contains a number, which is mentioned in the description.
3 2 2 4
30 HINT the first sample answer is(64+32+16+8)/4