Score : $500$ points
You are given an integer $M$ and $N$ pairs of integers $(A_1, B_1), (A_2, B_2), \dots, (A_N, B_N)$.
For all $i$, it holds that $1 \leq A_i \lt B_i \leq M$.
A sequence $S$ is said to be a good sequence if the following conditions are satisfied:
Let $f(k)$ be the number of possible good sequences of length $k$.
Enumerate $f(1), f(2), \dots, f(M)$.
Input is given from Standard Input in the following format:
$N$ $M$ $A_1$ $B_1$ $A_2$ $B_2$ $\vdots$ $A_N$ $B_N$
Print the answers in the following format:
$f(1)$ $f(2)$ $\dots$ $f(M)$
3 5 1 3 1 4 2 5
0 1 3 2 1
Here is the list of all possible good sequences.
1 2 1 2
2 1
5 9 1 5 1 7 5 6 5 8 2 6
0 0 1 2 4 4 3 2 1