You are given a permutation of length n and an integer k.
An element is called a record if it is strictly greater than all the elements before it.
Calculate the sum of (−1)len over all subsequences that have exactly k records. Here len is the number of elements in the subsequence. Since the answer can be large, calculate it modulo 998,244,353.
The first line contains two integers n and k (1≤k≤n≤106).
The second line contains the permutation p_1,p_2,…,p_n.
I'll let you guess this one.
In the second sample all of subsequences of length 3 have exactly 3 records, and none other subsequences have exactly 3 records, so the sum is equal to (−1)3(37)=−35, which is 998,244,318 modulo 998,244,353.
In the third sample none of the subsequences have exactly 5 records, and the sum of empty set is 0.