From 1880ccb6d85c6eb79e724593457877bab431951c Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:17:29 +0100 Subject: get rid of all() and sz() --- content/math/piLegendre.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content/math/piLegendre.cpp') diff --git a/content/math/piLegendre.cpp b/content/math/piLegendre.cpp index 46c8584..6401a4f 100644 --- a/content/math/piLegendre.cpp +++ b/content/math/piLegendre.cpp @@ -16,7 +16,7 @@ ll phi(ll n, ll k) { ll pi(ll n) { if (n < N) { // implement this as O(1) lookup for speedup! - return distance(primes.begin(), upper_bound(all(primes), n)); + return ranges::upper_bound(primes, n) - begin(primes); } else { ll k = pi(sqrtl(n) + 1); return n - phi(n, k) + k; -- cgit v1.2.3