diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2025-07-10 18:07:20 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2025-07-10 18:07:20 +0200 |
| commit | d4fbbdd85e2133361c72035a131940705a768d30 (patch) | |
| tree | c1450e431b2ad0d66c781445ef82521afa5e7814 /test/math/longestIncreasingSubsequence.cpp | |
| parent | 630a5bdf06d59b8340fb4bfc0e692cbcf094026a (diff) | |
try to fix tests
Diffstat (limited to 'test/math/longestIncreasingSubsequence.cpp')
| -rw-r--r-- | test/math/longestIncreasingSubsequence.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/math/longestIncreasingSubsequence.cpp b/test/math/longestIncreasingSubsequence.cpp index 0ed0f91..d08cf57 100644 --- a/test/math/longestIncreasingSubsequence.cpp +++ b/test/math/longestIncreasingSubsequence.cpp @@ -30,9 +30,9 @@ vector<int> naive(const vector<ll>& a) { return res; } -void stress_test() { +void stress_test(ll LIM) { ll queries = 0; - for (ll i = 0; i < 10'000; i++) { + for (ll i = 0; i < LIM; i++) { int n = Random::integer<int>(1, 12); auto a = Random::integers<ll>(n, -10, 10); auto expected = naive<true>(a); @@ -40,7 +40,7 @@ void stress_test() { if (got != expected) cerr << "error: strict" << FAIL; queries += n; } - for (ll i = 0; i < 10'000; i++) { + for (ll i = 0; i < LIM; i++) { int n = Random::integer<int>(1, 12); auto a = Random::integers<ll>(n, -10, 10); auto expected = naive<false>(a); @@ -71,6 +71,7 @@ void performance_test() { } int main() { - stress_test(); + stress_test(1'000); + if (!sanitize) stress_test(10'000); if (!sanitize) performance_test(); } |
