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

monotone_minima

関数 · Monotone Minima・min-plus 畳み込み

template <class T, class Comp = std::less<>, class F>
std::vector<int> monotone_minima(int h, int w, F f);

概要

各行の最適列が単調な行列について最適列番号を求める

パラメータ

名前 説明
h 行数
w 列数
f 行列要素を返す関数

戻り値

各行の最適列番号

計算量

関連項目