AT_awtf2025_e Functional Graph
Description
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 $ ( $ 1 \leq i \leq 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 $ .
- The number of $ i $ satisfying $ i
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ C $ $ K $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
The following six sequences $ x $ satisfy the conditions:
- $ x=(2,3,1) $
- $ x=(2,3,2) $
- $ x=(2,3,3) $
- $ x=(3,3,1) $
- $ x=(3,3,2) $
- $ x=(3,3,3) $
### Constraints
- $ 1 \leq N \leq 250000 $
- $ 1 \leq C \leq N $
- $ 0 \leq K \leq N-1 $
- All input values are integers.