From 700c9fd9924a8e807b6b126db2b6ed38a82e6e3a Mon Sep 17 00:00:00 2001 From: Luke Videckis Date: Thu, 15 Jan 2026 14:21:06 -0700 Subject: [PATCH 1/3] nit --- library/data_structures/seg_tree_inc.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/data_structures/seg_tree_inc.hpp b/library/data_structures/seg_tree_inc.hpp index 2a06383d..0b074bbb 100644 --- a/library/data_structures/seg_tree_inc.hpp +++ b/library/data_structures/seg_tree_inc.hpp @@ -2,11 +2,11 @@ //! https://codeforces.com/blog/entry/118682 //! @code //! { -//! tree_inc st(n, pii{}, [&](pii& l, pii& r) { +//! tree_inc st(n, pii(0, 0), [&](pii& l, pii& r) { //! return min(l, r); //! }); //! } -//! tree_inc st(n, int{}, ranges::min); +//! tree_inc st(n, int(0), ranges::min); //! rep(i, 0, n) st.update(i, a[i]); //! @endcode //! @time O(n + q log n) @@ -19,7 +19,7 @@ template struct tree_inc { int n; F op; vector s; - tree_inc(int n, T, F op): n(n), op(op), s(2 * n) {} + tree_inc(int n, T x, F op): n(n), op(op), s(2 * n, x) {} void update(int i, T val) { for (s[i += n] = val; i /= 2;) s[i] = op(s[2 * i], s[2 * i + 1]); From 45cab6f0ecfd5b52be092419f1a863b8132ba1b6 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 15 Jan 2026 21:23:08 +0000 Subject: [PATCH 2/3] [auto-verifier] verify commit 700c9fd9924a8e807b6b126db2b6ed38a82e6e3a --- .verify-helper/timestamps.remote.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.verify-helper/timestamps.remote.json b/.verify-helper/timestamps.remote.json index d70001e3..750d5cbd 100644 --- a/.verify-helper/timestamps.remote.json +++ b/.verify-helper/timestamps.remote.json @@ -46,8 +46,8 @@ "tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2025-08-14 12:01:15 -0600", "tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2024-12-15 14:34:10 -0600", "tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2024-12-21 00:23:10 -0500", -"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2024-12-21 00:23:10 -0500", +"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2026-01-15 14:21:06 -0700", +"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2026-01-15 14:21:06 -0700", "tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2024-12-14 15:47:13 -0600", "tests/library_checker_aizu_tests/flow/dinic_aizu.test.cpp": "2024-11-17 14:04:03 -0600", "tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2024-11-17 14:04:03 -0600", From 9b0ec89dd34a6d2c412b2c6ff60e1b06168b78bc Mon Sep 17 00:00:00 2001 From: Luke Videckis Date: Thu, 15 Jan 2026 14:26:57 -0700 Subject: [PATCH 3/3] more init methods --- library/data_structures/seg_tree_inc.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/library/data_structures/seg_tree_inc.hpp b/library/data_structures/seg_tree_inc.hpp index 0b074bbb..74a41aaa 100644 --- a/library/data_structures/seg_tree_inc.hpp +++ b/library/data_structures/seg_tree_inc.hpp @@ -1,13 +1,11 @@ #pragma once //! https://codeforces.com/blog/entry/118682 //! @code -//! { -//! tree_inc st(n, pii(0, 0), [&](pii& l, pii& r) { -//! return min(l, r); -//! }); -//! } -//! tree_inc st(n, int(0), ranges::min); -//! rep(i, 0, n) st.update(i, a[i]); +//! tree_inc st1(n, pii(0, 0), [&](pii& l, pii& r) { +//! return min(l, r); +//! }); +//! tree_inc st2(n, (int)0, ranges::min); +//! tree_inc st3(n, (ll)0, plus{}); //! @endcode //! @time O(n + q log n) //! @space O(n)