Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[問題案] Counting Spanning Trees (Undirected / Directed) #1082

Closed
maspypy opened this issue Jan 16, 2024 · 2 comments
Closed

[問題案] Counting Spanning Trees (Undirected / Directed) #1082

maspypy opened this issue Jan 16, 2024 · 2 comments
Labels
contributions-welcome 審査済み work in progress 担当者が決定した

Comments

@maspypy
Copy link
Collaborator

maspypy commented Jan 16, 2024

[問題]
(無向)
$N$ 頂点 $M$ 辺の無向グラフが与えられる.全域木を数える.使う辺番号が違うなら違うとする.
mod 998244353.

(有向)
$N$ 頂点 $M$ 辺の有向グラフが与えられる.根 $r$ も与えられる. $r$ を根とする有向全域木を数える.使う辺番号が違うなら違うとする.
mod 998244353.

[制約]
$N\leq 500$

[解法]
行列木定理

@NachiaVivias
Copy link
Collaborator

とりあえずは sparse 仕様ではないほうが良いと思います。 (需要が多そうな、全要素持つものの verify が不便になって辛そうなので)

@maspypy
Copy link
Collaborator Author

maspypy commented Jan 16, 2024

出題が多いのもそっちな気がしてきたので、単に $N\leq 500$ ということにしておきます。

@maspypy maspypy added the contributions-welcome 審査済み label Jan 19, 2024
@maspypy maspypy added the work in progress 担当者が決定した label May 20, 2024
@maspypy maspypy closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome 審査済み work in progress 担当者が決定した
Projects
None yet
Development

No branches or pull requests

2 participants