summaryrefslogtreecommitdiff
path: root/datastructures/test/segmentTree2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'datastructures/test/segmentTree2.cpp')
-rw-r--r--datastructures/test/segmentTree2.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/datastructures/test/segmentTree2.cpp b/datastructures/test/segmentTree2.cpp
deleted file mode 100644
index f403a1d..0000000
--- a/datastructures/test/segmentTree2.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "segmentTree2.tmp.cpp"
-
-void test(int n) {
- vector<ll> a(n);
- for (ll &x: a) x = util::randint();
- SegTree seg(a);
- for (int i = 0; i < 5*n; i++) {
- {
- int l = util::randint(n+1);
- int r = util::randint(n+1);
- if (l > r) swap(l, r);
- ll v = util::randint();
- for (int i = l; i < r; i++) a[i] += v;
- seg.modify(l, r, v);
- }
- {
- int j = util::randint(n);
- assert(seg.query(j) == a[j]);
- }
- }
-}
-
-int main() {
- test(1000);
- test(1);
-}