7013.Tournament Graph Distribution

Time Limit: 1s Memory Limit: 512MB

A tournament graph is a directed graph where a single directed edge exists between every pair of nodes.

Given $n$ , your task is to calculate for each $k = 1 \dots n$ the number of tournament graphs that have $n$ nodes and $k$ strongly connected components.

Input Format(From the terminal/stdin)

The only line has an integer $n$ : the number of nodes.

  • $1 \le n \le 500$

Output Format(To the terminal/stdout)

Print $n$ lines: for each $k=1 \dots n$ the number of graphs modulo $10^9+7$ .

Sample Input

Copy
3
 \n

Sample Output

Copy
2
0
6
 \n
 \n
 \n
Source: CSES, Counting Problems, 3232

Submit

请先 登录

© 2025 FAQs