summaryrefslogtreecommitdiff
path: root/content/math/discreteLogarithm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'content/math/discreteLogarithm.cpp')
-rw-r--r--content/math/discreteLogarithm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/math/discreteLogarithm.cpp b/content/math/discreteLogarithm.cpp
index 68866e0..844bd27 100644
--- a/content/math/discreteLogarithm.cpp
+++ b/content/math/discreteLogarithm.cpp
@@ -5,11 +5,11 @@ ll dlog(ll a, ll b, ll m) { //a > 0!
vals[i] = {e, i};
}
vals.emplace_back(m, 0);
- sort(all(vals));
+ ranges::sort(vals);
ll fact = powMod(a, m - bound - 1, m);
for (ll i = 0; i < m; i += bound, b = (b * fact) % m) {
- auto it = lower_bound(all(vals), pair<ll, ll>{b, 0});
+ auto it = ranges::lower_bound(vals, pair<ll, ll>{b, 0});
if (it->first == b) {
return (i + it->second) % m;
}}