#P10982. Connected Graph

Connected Graph

Background

This problem is a simplified version of P4841 [CTT Homework 2013] City Planning, with the polynomial part from the original problem removed.

Problem Description

Find the number of labeled undirected connected graphs with nn vertices.

Input Format

Input one positive integer nn.

Output Format

Output the answer modulo 10045358091004535809 ( 479×221+1479 \times 2 ^{21} + 1 ).

3
4
4
38

Hint

Constraints: 1n10001\leq n \leq 1000.

Translated by ChatGPT 5