summaryrefslogtreecommitdiff
path: root/test/other
diff options
context:
space:
mode:
Diffstat (limited to 'test/other')
-rw-r--r--test/other/bitOps.cpp4
-rw-r--r--test/other/divideAndConquer.cpp2
-rw-r--r--test/other/fastSubsetSum.cpp2
-rw-r--r--test/other/josephus2.cpp2
-rw-r--r--test/other/josephusK.cpp2
-rw-r--r--test/other/knuth.cpp2
-rw-r--r--test/other/pbs.cpp4
7 files changed, 9 insertions, 9 deletions
diff --git a/test/other/bitOps.cpp b/test/other/bitOps.cpp
index 2250521..adaa49a 100644
--- a/test/other/bitOps.cpp
+++ b/test/other/bitOps.cpp
@@ -27,13 +27,13 @@ void test_subsets() {
ll naive(ll x) {
vector<ll> bits;
- for (ll i = 0; i < 64; i++) {
+ for (ll i = 0; i < 63; i++) {
bits.push_back(x & 1);
x >>= 1;
}
ranges::next_permutation(bits | views::reverse);
x = 0;
- for (ll i = 0, j = 1; i < 64; i++, j <<= 1) {
+ for (ll i = 0, j = 1; i < 63; i++, j <<= 1) {
if (bits[i] != 0) x |= j;
}
return x;
diff --git a/test/other/divideAndConquer.cpp b/test/other/divideAndConquer.cpp
index 6d1b444..3878758 100644
--- a/test/other/divideAndConquer.cpp
+++ b/test/other/divideAndConquer.cpp
@@ -98,6 +98,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/fastSubsetSum.cpp b/test/other/fastSubsetSum.cpp
index c61b1ea..ea40184 100644
--- a/test/other/fastSubsetSum.cpp
+++ b/test/other/fastSubsetSum.cpp
@@ -44,6 +44,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/josephus2.cpp b/test/other/josephus2.cpp
index f2c0440..074b481 100644
--- a/test/other/josephus2.cpp
+++ b/test/other/josephus2.cpp
@@ -37,6 +37,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/josephusK.cpp b/test/other/josephusK.cpp
index 1a5aa9d..dab291b 100644
--- a/test/other/josephusK.cpp
+++ b/test/other/josephusK.cpp
@@ -38,6 +38,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/knuth.cpp b/test/other/knuth.cpp
index aaf5059..3d6cb9b 100644
--- a/test/other/knuth.cpp
+++ b/test/other/knuth.cpp
@@ -98,6 +98,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/pbs.cpp b/test/other/pbs.cpp
index e1dfea0..4a8da2e 100644
--- a/test/other/pbs.cpp
+++ b/test/other/pbs.cpp
@@ -93,11 +93,11 @@ void performance_test() {
t.stop();
ll hash = accumulate(begin(ans), end(ans), 0LL);
- if (t.time > 700) cerr << "too slow: " << t.time << FAIL;
+ if (t.time > 900) cerr << "too slow: " << t.time << FAIL;
cerr << "tested performance: " << t.time << "ms (hash: " << hash << ")" << endl;
}
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}