aboutsummaryrefslogtreecommitdiff
path: root/aberth/aberth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aberth/aberth.cpp')
-rw-r--r--aberth/aberth.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/aberth/aberth.cpp b/aberth/aberth.cpp
index 8f65ef1..295e99c 100644
--- a/aberth/aberth.cpp
+++ b/aberth/aberth.cpp
@@ -8,7 +8,6 @@
#include <utility>
#include <tuple>
#include <algorithm>
-#include <numeric>
#include <thread>
#include <mutex>
#include <cstdlib>
@@ -312,7 +311,10 @@ static tuple<int, int, vector<int>> readCounts(const char *fname) {
}
static int rankCounts(vector<int> &counts) {
- int maxcount = reduce(counts.begin(), counts.end(), 0, [](int a, int b) -> int { return max(a, b); });
+ int maxcount = 0;
+ for (int i = 0; i < (int)counts.size(); i++) {
+ maxcount = max(maxcount, counts[i]);
+ }
vector<int> cumul(maxcount + 1, 0);
for (int v : counts) cumul[v]++;