上一页 1 2 3 4 5 6 ··· 59 下一页
摘要: 题目链接: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)
摘要: 题目链接:https://codeforces.com/problemset/problem/1093/E 解题思路来自 oi.wiki 这道题 与其说是 “分块 套 树状数组”,不如说是 “树状数组 套 分块 (再)套 树状数组”。因为分块还需要用树状数组维护一个前缀和。 如果直接 分块 + 树状 阅读全文
posted @ 2026-01-08 23:03 quanjun 阅读(12) 评论(0) 推荐(0)
摘要: 题目链接: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)
摘要: 题目链接:https://www.luogu.com.cn/problem/P4093 解题思路完全来自 一剑霜寒十四洲 大佬的博客 大题思路是: 我们设3个数组: \(a[i]\) 表示原来第 \(i\) 个位置上的值。 \(maxa[i]\) 表示第 \(i\) 个位置上可以变成的最大值。 \( 阅读全文
posted @ 2026-01-08 18:36 quanjun 阅读(7) 评论(0) 推荐(0)
摘要: 题目链接: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)
摘要: 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)
摘要: 题目链接: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)
摘要: 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)
摘要: 题目链接: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)
摘要: 题目链接: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 下一页