From 17c4579c94de80084b4383d0c3b08a263f8f06fb Mon Sep 17 00:00:00 2001 From: JJCUBER <34446698+JJCUBER@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:36:16 -0400 Subject: [PATCH 1/2] Clarify inclusive-exclusive for Mo Queries --- content/data-structures/MoQueries.h | 1 + 1 file changed, 1 insertion(+) diff --git a/content/data-structures/MoQueries.h b/content/data-structures/MoQueries.h index cda924695..db51655e6 100644 --- a/content/data-structures/MoQueries.h +++ b/content/data-structures/MoQueries.h @@ -5,6 +5,7 @@ * Source: https://github.com/hoke-t/tamu-kactl/blob/master/content/data-structures/MoQueries.h * Description: Answer interval or tree path queries by finding an approximate TSP through the queries, * and moving from one query to the next by adding/removing points at the ends. + * Queries are inclusive-exclusive, i.e. of the form [L, R). * If values are on tree edges, change \texttt{step} to add/remove the edge $(a, c)$ and remove the initial \texttt{add} call (but keep \texttt{in}). * Time: O(N \sqrt Q) * Status: stress-tested From d7b58eafb4713ed2835032677f750b6782a6d5d6 Mon Sep 17 00:00:00 2001 From: JJCUBER <34446698+JJCUBER@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:37:15 -0400 Subject: [PATCH 2/2] Clarify inclusive-exclusive for Lazy Segment Tree --- content/data-structures/LazySegmentTree.h | 1 + 1 file changed, 1 insertion(+) diff --git a/content/data-structures/LazySegmentTree.h b/content/data-structures/LazySegmentTree.h index ecad9a0a5..f3f65905f 100644 --- a/content/data-structures/LazySegmentTree.h +++ b/content/data-structures/LazySegmentTree.h @@ -5,6 +5,7 @@ * Source: me * Description: Segment tree with ability to add or set values of large intervals, and compute max of intervals. * Can be changed to other things. + * Updates and Queries are inclusive-exclusive, i.e. of the form [L, R). * Use with a bump allocator for better performance, and SmallPtr or implicit indices to save memory. * Time: O(\log N). * Usage: Node* tr = new Node(v, 0, sz(v));