You are playing a number-calling game with Akie.
The rules of the game are as follows: You and Akie take turns calling numbers, starting with you. Each time, you can call any positive integer between $$$1$$$ and $$$2n$$$ that hasn't been called yet. Since Akie is a born coward, she will only call the smallest positive integer that hasn't been called yet. The game lasts for $$$n$$$ rounds, and all $$$2n$$$ positive integers are called exactly once.
Let $$$S$$$ be the sum of all the numbers called by Akie. If $$$S \geq k$$$, Akie wins.
Given the constant $$$k$$$, how many scenarios allow Akie to win? The answer should be modulo $$$p$$$. Two scenarios are considered different if and only if there exists a round where you call a different number or Akie calls a different number.
One line containing three positive integers $$$n$$$, $$$k$$$, and modulus $$$p$$$.
It is guaranteed that $$$1 \leq n \leq 100$$$, $$$\displaystyle\frac{n(n+1)}{2} \leq k \leq n(n+1)$$$, $$$10^8 + 7 \leq p \leq 10^9 + 9$$$, and $$$p$$$ is prime.
An integer representing the answer.
2 4 998244353
6
5 20 1000000007
2688
When $$$n = 2$$$ , all the possible number sequences called out are: $$$(1,2,3,4)$$$, $$$(1,2,4,3)$$$, $$$(2,1,3,4)$$$, $$$(2,1,4,3)$$$, $$$(3,1,2,4)$$$, $$$(3,1,4,2)$$$, $$$(4,1,2,3)$$$, $$$(4,1,3,2)$$$ .The $$$2$$$nd number and the $$$4$$$th number are called by Akie.