Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Help with counting task

Правка en3, от I_Love_Panaetisme, 2016-11-29 07:46:03

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский I_Love_Panaetisme 2016-11-29 07:46:03 2
en2 Английский I_Love_Panaetisme 2016-11-23 21:43:56 6 Tiny change: 'f with an oriented graph ' -> 'f with an directed graph '
en1 Английский I_Love_Panaetisme 2016-11-22 18:09:47 787 Initial revision (published)