From 0f1223c5396961a661da4f12caf0252f924de01b Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Wed, 19 Feb 2025 21:29:03 +0100 Subject: reverse dynamic convex hull --- test/datastructures/dynamicConvexHull.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/datastructures/dynamicConvexHull.cpp') diff --git a/test/datastructures/dynamicConvexHull.cpp b/test/datastructures/dynamicConvexHull.cpp index e0345af..02e50f4 100644 --- a/test/datastructures/dynamicConvexHull.cpp +++ b/test/datastructures/dynamicConvexHull.cpp @@ -29,7 +29,7 @@ void stress_test(ll range) { ll got = hd.query(x); ll expected = naive[0](x); - for (auto l : naive) expected = max(expected, l(x)); + for (auto l : naive) expected = min(expected, l(x)); if (got != expected) cerr << "got: " << got << ", expected: " << expected << FAIL; queries++; @@ -49,7 +49,7 @@ void performance_test() { ll m = Random::integer(-1'000'000'000, 1'000'000'000); ll c = Random::integer(-1'000'000'000, 1'000'000'000); ll x = Random::integer(-1'000'000'000, 1'000'000'000); - + t.start(); hd.add(m, c); hash += hd.query(x); -- cgit v1.2.3