会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
劝君
渭城朝雨浥轻尘,客舍青青柳色新。劝君更尽一杯酒,西出阳关无故人。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
59
下一页
2026年1月13日
洛谷P6329 【模板】点分树 / 震波 题解 动态点分治/点分树 模板题
摘要: 题目链接:https://www.luogu.com.cn/problem/P6329 思路全部来自 OI WIKI:https://oi.wiki/graph/dynamic-tree-divide/ 按照自己的码风写了一下。 示例程序: #include <bits/stdc++.h> usin
阅读全文
posted @ 2026-01-13 23:17 quanjun
阅读(6)
评论(0)
推荐(0)
2026年1月8日
CF1093E.Intersection of Permutations 题解 分块套树状数组
摘要: 题目链接:https://codeforces.com/problemset/problem/1093/E 解题思路来自 oi.wiki 这道题 与其说是 “分块 套 树状数组”,不如说是 “树状数组 套 分块 (再)套 树状数组”。因为分块还需要用树状数组维护一个前缀和。 如果直接 分块 + 树状
阅读全文
posted @ 2026-01-08 23:03 quanjun
阅读(12)
评论(0)
推荐(0)
洛谷P2617 Dynamic Rankings 题解 树套树(树状数组 套 权值线段树)
摘要: 题目链接:https://www.luogu.com.cn/problem/P2617 这题应该算模板题吧。 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5, inf = 1e9; int n,
阅读全文
posted @ 2026-01-08 19:30 quanjun
阅读(5)
评论(0)
推荐(0)
洛谷P4093 [HEOI2016/TJOI2016] 序列 题解 树套树(树状数组 套 splay tree)
摘要: 题目链接:https://www.luogu.com.cn/problem/P4093 解题思路完全来自 一剑霜寒十四洲 大佬的博客 大题思路是: 我们设3个数组: \(a[i]\) 表示原来第 \(i\) 个位置上的值。 \(maxa[i]\) 表示第 \(i\) 个位置上可以变成的最大值。 \(
阅读全文
posted @ 2026-01-08 18:36 quanjun
阅读(7)
评论(0)
推荐(0)
洛谷P1903 【模板】带修莫队 / [国家集训队] 数颜色 / 维护队列 题解 树套树(线段树 套 splay tree)
摘要: 题目链接:https://www.luogu.com.cn/problem/P1903 特别鸣谢 感谢 CuteMurasame 大佬 帮我指出了 splay tree 的 get_rnk 函数忘了 splay 的问题。 我的思路大致是这样的(这一部分显示暴力维护一个 \(pre_i\)): 我们用
阅读全文
posted @ 2026-01-08 17:24 quanjun
阅读(24)
评论(0)
推荐(0)
2026年1月5日
Marp for vscode举例
摘要: marp: true theme: default size: 16:9 # 标题巴拉巴拉 巴拉巴拉 打印 ppt 快捷键:Ctrl + Shift + P,然后输入 Marp: Export Slide Deck
阅读全文
posted @ 2026-01-05 21:48 quanjun
阅读(4)
评论(0)
推荐(0)
2026年1月1日
洛谷U644377 平面点对 题解 树套树(权值线段树 套 权值线段树)
摘要: 题目链接:https://www.luogu.com.cn/problem/U644377 空间有点大,把坐标范围从 \([-10^9,10^9]\) 缩小到 \([-10^5,10^5]\) 了。 示例程序: #include <bits/stdc++.h> using namespace std
阅读全文
posted @ 2026-01-01 16:46 quanjun
阅读(9)
评论(0)
推荐(0)
2025年12月31日
洛谷P3380/AcWing2476. 树套树 题解 线段树 套 平衡树
摘要: 2026/1/8 更新: 之前 splay tree 的 del 函数写的有点丑,已修改; 之前 splay tree 的 get_rnk 函数,结束时忘了 splay 了,已修改。 题目链接:https://www.acwing.com/problem/content/description/24
阅读全文
posted @ 2025-12-31 16:43 quanjun
阅读(6)
评论(0)
推荐(0)
2025年12月26日
洛谷U644824 简单的平衡树问题 题解 splay tree 模板题
摘要: 题目链接:https://www.luogu.com.cn/problem/U644824 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 4e5 + 5; struct Node { int s[2], p,
阅读全文
posted @ 2025-12-26 04:04 quanjun
阅读(5)
评论(0)
推荐(0)
2025年12月25日
AcWing2488. 树套树-简单版 题解 树套树(线段树 套 STL(multiset))
摘要: 题目链接:https://www.acwing.com/problem/content/description/2490/ 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 5e4 + 5; multiset<i
阅读全文
posted @ 2025-12-25 03:09 quanjun
阅读(6)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
59
下一页
公告