AtCoder Beginner Contest 387(Promotion of AtCoderJobs)
翻译中…
Problem Statement
翻译中…
Find the number, modulo $998244353$, of simple undirected connected graphs $G$ with $N$ vertices labeled from $1$ to $N$ that satisfy the following condition:
翻译中…
- For every circuit in
$G$, the number of edges in that circuit is a prime number. Here, a circuit is a closed trail that may pass through the same vertex more than once (but must not use the same edge more than once).
翻译中…
Constraints
翻译中…
$N$is an integer between 1 and$2.5 \times 10^5$, inclusive.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the number, modulo $998244353$, of simple undirected connected graphs $G$ satisfying the condition.
翻译中…
样例
Input #1
3
Output #1
4
There are four such graphs $G$:
- The graph with edges $(1, 2)$ and $(1, 3)$
- The graph with edges $(1, 2)$ and $(2, 3)$
- The graph with edges $(1, 3)$ and $(2, 3)$
- The graph with edges $(1, 2)$, $(1, 3)$, and $(2, 3)$
Input #2
2025
Output #2
879839321
Input #3
61261
Output #3
202537766
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。