← Home
write a go solution for Description:
Consider an array a of n integers, where every element is from 1 to k, and every integer from 1 to k appears at least once.

Let the array b be constructed as follows: for the i-th element of a, b_i is the distance to the closest element in a which is not equal to a_i. In other words, b_i=minlimits_jin[1,n],a_jnea_i|i-j|.

For example, if a=[1,1,2,3,3,3,3,1], then b=[2,1,1,1,2,2,1,1].

Calculate the number of different arrays b you can obtain if you consider all possible arrays a, and print it modulo 998244353.

Input Format:
The only line of the input contains two integers n and k (2<=n<=2*10^5; 2<=k<=min(n,10)).

Output Format:
Print one integer — the number of different arrays b you can obtain, taken modulo 998244353.

Note:
None. Output only the code with no comments, explanation, or additional text.