Hey, I'm looking for help with the following task.
You start off with an directed graph of N ≤ 100 nodes and no arcs. For every step ≤ M ≤ N * (N - 1) you emplace a non-existing arc in the graph and you write down the number of strongly connected components. Together, these numbers form a list of numbers. Count the number of distinct lists you can obtain. You must print the answer for every intermediate step. There will be at most 10 test cases in the input and the answer is printed modulo an arbitrary number, which will be ≤ 1.000.000.000.
Input: 5 10 666013 (N, M, MOD)
Output: 1 2 4 9 21 50 110 209 351 546
Input: 6 9 10
Output: 1 2 4 9 1 1 6 0 7
Thanks in advance.