{"raw_statement":[{"iden":"problem statement","content":"Below, a permutation of $(1,2,\\ldots,N)$ is simply called a permutation.\nFor two permutations $A=(A_1,A_2,\\ldots,A_N),B=(B_1,B_2,\\ldots,B_N)$, let us define their **similarity** as the number of integers $i$ between $1$ and $N-1$ such that:\n\n*   $(A_{i+1}-A_i)(B_{i+1}-B_i)>0$.\n\nFind the number, modulo a prime number $P$, of pairs of permutations $(A,B)$ whose similarity is $K$."},{"iden":"constraints","content":"*   $2\\leq N \\leq 100$\n*   $0\\leq K \\leq N-1$\n*   $10^8 \\leq P \\leq 10^9$\n*   $P$ is a prime number.\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $K$ $P$"},{"iden":"sample input 1","content":"3 1 282282277"},{"iden":"sample output 1","content":"16\n\nFor instance, below is a pair of permutations that satisfies the condition.\n\n*   $A=(1,2,3)$\n*   $B=(1,3,2)$\n\nHere, we have $(A_2 - A_1)(B_2 -B_1) > 0$ and $(A_3 - A_2)(B_3 -B_2) < 0$, so the similarity of $A$ and $B$ is $1$."},{"iden":"sample input 2","content":"50 25 998244353"},{"iden":"sample output 2","content":"131276976\n\nPrint the number modulo $P$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}