algo — C++23 日本語リファレンス GitHub

mod

関数 · 形式的冪級数 (FPS)

template <internal::static_modint_c mint>
std::vector<mint> mod(const std::vector<mint> &f, const std::vector<mint> &g);

概要

多項式の剰余 f mod g

テンプレートパラメータ

名前 説明
mint static modint

パラメータ

名前 説明
f 被除多項式の係数列
g 除多項式の係数列($0$ 多項式でないこと)

戻り値

std::vector<mint> 剰余 r($\deg r < \deg g$)

計算量

関連項目