摘要: 题目链接:https://www.luogu.com.cn/problem/P3605 解题思路: 首先需要离散化一下。 然后就是套 树上启发式合并模板了,期间用树状数组维护一下区间和。 时间复杂度:\(O(n \log^2 n)\)。 示例程序: #include <bits/stdc++.h> 阅读全文
posted @ 2024-12-19 15:33 quanjun 阅读(55) 评论(0) 推荐(0)