{"problem":{"name":"Functional Graph","description":{"content":"You are given integers $N$, $C$, and $K$. Find the number, modulo $998244353$, of length-$N$ integer sequences $x=(x_1,x_2,\\ldots,x_N)$ satisfying the following conditions. *   $1 \\leq x_i \\leq N$ ($","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":8000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"awtf2025_e"},"statements":[{"statement_type":"Markdown","content":"You are given integers $N$, $C$, and $K$. Find the number, modulo $998244353$, of length-$N$ integer sequences $x=(x_1,x_2,\\ldots,x_N)$ satisfying the following conditions.\n\n*   $1 \\leq x_i \\leq N$ ($1 \\leq i \\leq N$).\n*   Consider an undirected graph with $N$ vertices numbered from $1$ to $N$. This graph has $N$ edges, and the $i$\\-th edge connects vertices $i$ and $x_i$. Then, the number of connected components of the graph is exactly $C$.\n*   The number of $i$ satisfying $i<x_i$ is exactly $K$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 250000$\n*   $1 \\leq C \\leq N$\n*   $0 \\leq K \\leq N-1$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $C$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"awtf2025_e","tags":[],"sample_group":[["3 1 2","6\n\nThe following six sequences $x$ satisfy the conditions:\n\n*   $x=(2,3,1)$\n*   $x=(2,3,2)$\n*   $x=(2,3,3)$\n*   $x=(3,3,1)$\n*   $x=(3,3,2)$\n*   $x=(3,3,3)$"],["3 2 2","0"],["6 3 0","225"],["20 4 7","476087626"],["250000 2025 125000","410390562"]],"created_at":"2026-03-03 11:01:13"}}