C++ Library for Competitive Programming
#include "emthrm/math/enumerate_quotients.hpp"
$O(\sqrt{N})$
名前 | 戻り値 |
---|---|
template <typename T> std::vector<std::tuple<T, T, T>> enumerate_quotients(const T n);
|
$\lbrace (l, r, q) \mid \forall x \in \lbrace l, l + 1, \ldots, r - 1 \rbrace,\ \lfloor \frac{n}{x} \rfloor = q \rbrace$ |
備考1
備考2
https://judge.yosupo.jp/submission/137127