2022年2月27日
摘要: 时间复杂度 $O(nlogn)$,建树、查询、修改。 区间第 $k$ 小值。 https://www.luogu.com.cn/problem/P3834 ``` #include using namespace std; using LL = long long; struct President 阅读全文
posted @ 2022-02-27 21:22 Hamine 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 查询复杂度:$O(logn)$ **区间修改,区间查询** ``` #include using namespace std; using LL = long long; struct SegmentTree{ struct node{ int l, r; LL sum, add; }; vecto 阅读全文
posted @ 2022-02-27 11:35 Hamine 阅读(77) 评论(0) 推荐(0) 编辑