Напоминание: в случае технических проблем любого характера, вы можете использовать m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

Help me solve this hard 1400 rated problem

Правка en1, от 69eloChess, 2024-08-20 13:42:46

You are given an integer N and a prime P. Count the number, modulo P, of undirected connected graphs G of N vertices numbered 1 to N that satisfy the following conditions:

There are no self-loops in G. Note that multiple edges are allowed.

For all edges (u,v) in G, if we delete (u,v) from G, G remains connected. In other words, G is edge-biconnected.

For all edges (u,v) in G, if we delete (u,v) from G, G is no longer edge-biconnected. Two graphs are considered different if and only if there exists a pair of distinct vertices (u,v) such that the numbers of edges connecting u and v in the two graphs are different.

N<=50, P<=1e9

Input : Two integers N and P

Output: Print the answer.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский 69eloChess 2024-08-20 13:42:46 763 Initial revision (published)