Record Parity

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

You are given a permutation of length nn and an integer kk.

An element is called a record if it is strictly greater than all the elements before it.

Calculate the sum of (1)len(-1)^{\mathit{len}} over all subsequences that have exactly kk records. Here len\mathit{len} is the number of elements in the subsequence. Since the answer can be large, calculate it modulo 998,244,353998\\,244\\,353.

입력

The first line contains two integers nn and kk (1kn1061 \le k \le n \le 10^6).

The second line contains the permutation p_1,p_2,,p_np\_1, p\_2, \ldots, 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(73)=35(-1)^3 \binom{7}{3} = -35, which is 998,244,318998\\,244\\,318 modulo 998,244,353998\\,244\\,353.

In the third sample none of the subsequences have exactly 5 records, and the sum of empty set is 0.