Once upon a time, there was a witch named Geor Autumn, who set off on a journey across the world. Along the way, she would meet all kinds of people, from a country full of ICPC competitors to a horse in love with dota---but with each meeting, Geor would become a small part of their story, and her own world would get a little bit bigger. Geor just arrived at the state of Shu where people love poems. A poem is a permutation (a1,…,an) is a permutation of [n]{[n]}[n] means that each ai{a_i}ai is an integer in [1,n]{[1,n]}[1,n] and that a1,…,an are distinct.) One poem is good if for all integer i{i}i satisfying i>k{i> k}i>k and i≤n{ile n}i≤n, ai>min(aik,…,ai1) denotes the minimum value among aik,…,ai1. Help Geor calculate how many good poems there are, given n{n}n and k{k}k. To avoid huge numbers, output the answer modulo 998244353{998244353}998244353.
Once upon a time, there was a witch named Geor Autumn, who set off on a journey across the world. Along the way, she would meet all kinds of people, from a country full of ICPC competitors to a horse in love with dota---but with each meeting, Geor would become a small part of their story, and her own world would get a little bit bigger. Geor just arrived at the state of Shu where people love poems. A poem is a permutation (a1,…,an){(a_1,ldots, a_n)}(a1,…,an) of [n]{[n]}[n]. ((a1,…,an)(a_1,ldots, a_n)(a1,…,an) is a permutation of [n]{[n]}[n] means that each ai{a_i}ai is an integer in [1,n]{[1,n]}[1,n] and that a1,…,an{a_1,ldots, a_n}a1,…,an are distinct.) One poem is good if for all integer i{i}i satisfying i>k{i> k}i>k and i≤n{ile n}i≤n, ai>min(ai−k,…,ai−1){a_i>min(a_{i-k}, ldots, a_{i-1})}ai>min(ai−k,…,ai−1). Here min(ai−k,…,ai−1){min(a_{i-k}, ldots, a_{i-1})}min(ai−k,…,ai−1) denotes the minimum value among ai−k,…,ai−1{a_{i-k}, ldots, a_{i-1}}ai−k,…,ai−1. Help Geor calculate how many good poems there are, given n{n}n and k{k}k. To avoid huge numbers, output the answer modulo 998244353{998244353}998244353.