This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub maspypy/library
#include "graph/count/count_labeled_tree.hpp"
#pragma once // https://oeis.org/A000272 template <typename mint> vc<mint> count_labeled_tree(ll nmax) { vc<mint> f(nmax + 1); FOR(n, 1, nmax + 1) { f[n] = (n == 1 ? mint(1) : mint(n).pow(n - 2)); } return f; }
#line 2 "graph/count/count_labeled_tree.hpp" // https://oeis.org/A000272 template <typename mint> vc<mint> count_labeled_tree(ll nmax) { vc<mint> f(nmax + 1); FOR(n, 1, nmax + 1) { f[n] = (n == 1 ? mint(1) : mint(n).pow(n - 2)); } return f; }