We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[問題] (無向) $N$ 頂点 $M$ 辺の無向グラフが与えられる.全域木を数える.使う辺番号が違うなら違うとする. mod 998244353.
(有向) $N$ 頂点 $M$ 辺の有向グラフが与えられる.根 $r$ も与えられる. $r$ を根とする有向全域木を数える.使う辺番号が違うなら違うとする. mod 998244353.
[制約] $N\leq 500$
[解法] 行列木定理
The text was updated successfully, but these errors were encountered:
とりあえずは sparse 仕様ではないほうが良いと思います。 (需要が多そうな、全要素持つものの verify が不便になって辛そうなので)
Sorry, something went wrong.
出題が多いのもそっちな気がしてきたので、単に $N\leq 500$ ということにしておきます。
No branches or pull requests
[問題]
$N$ 頂点 $M$ 辺の無向グラフが与えられる.全域木を数える.使う辺番号が違うなら違うとする.
(無向)
mod 998244353.
(有向)
$N$ 頂点 $M$ 辺の有向グラフが与えられる.根 $r$ も与えられる. $r$ を根とする有向全域木を数える.使う辺番号が違うなら違うとする.
mod 998244353.
[制約]
$N\leq 500$
[解法]
行列木定理
The text was updated successfully, but these errors were encountered: