summaryrefslogtreecommitdiff
path: root/datastructures/test/sparseTableDisjoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'datastructures/test/sparseTableDisjoint.cpp')
-rw-r--r--datastructures/test/sparseTableDisjoint.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/datastructures/test/sparseTableDisjoint.cpp b/datastructures/test/sparseTableDisjoint.cpp
deleted file mode 100644
index 7ef6483..0000000
--- a/datastructures/test/sparseTableDisjoint.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#define sz ssize
-#define all(X) begin(X), end(X)
-#include "../sparseTableDisjoint.cpp"
-
-void test(int n) {
- vector<ll> values(n);
- for (ll &x: values) x = util::randint();
- DisjointST st;
- st.init(values);
- for (int i = 0; i < n; i++) {
- int l = util::randint(n);
- int r = util::randint(n);
- if (l > r) swap(l, r);
- r++;
- assert(
- st.query(l, r)
- ==
- accumulate(values.begin()+l, values.begin()+r, 0ll)
- );
- }
-}
-
-int main() {
- test(1000);
- test(1);
-}