From 03788f48be2634c36cd19ba25b0a851685b9c877 Mon Sep 17 00:00:00 2001 From: MZuenni Date: Wed, 30 Nov 2022 12:43:27 +0100 Subject: use all macro --- math/piLegendre.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'math/piLegendre.cpp') diff --git a/math/piLegendre.cpp b/math/piLegendre.cpp index f45ee85..21b974b 100644 --- a/math/piLegendre.cpp +++ b/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(primes.begin(), primes.end(), n)); + return distance(primes.begin(), upper_bound(all(primes), n)); } else { ll k = pi(sqrtl(n) + 1); return n - phi(n, k) + k; -- cgit v1.2.3