上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 70 下一页
摘要: 题目链接: https://www.luogu.com.cn/problem/SP10707 (spoj 的 remote judge好像也不行了,但是可以看中文题面) https://www.spoj.com/problems/COT2/ SPOJ官网题面(英文,可提交) 求 欧拉序,得到一个长度 阅读全文
posted @ 2026-03-05 11:23 quanjun 阅读(31) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/CF940F 带修莫队 模板题。 求 mex 的部分可以暴力。逻辑完全参考自 ouuan 大佬的博客 示例程序: #include <bits/stdc++.h> using namespace std; const int 阅读全文
posted @ 2026-03-04 17:20 quanjun 阅读(23) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P1903 解题思路完全来自 《算法竞赛》(书)及 oi.wiki。 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 133333 + 阅读全文
posted @ 2026-03-04 16:15 quanjun 阅读(26) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P2487 解题思路完全来自: oi.wiki 和 hsfzLZH1 大佬的这篇博客 其中最主要的是 hsfzLZH1 大佬 题解中的这段表述: 这个数据结构(线段树/树状数组)需要进行两种操作: 修改单点的值; 查询区间的 阅读全文
posted @ 2026-01-16 03:50 quanjun 阅读(27) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P3157 解题思路: 设: \(pos_i\) 表示第 \(i\) 个元素初始的位置; \(val_i\) 表示第 \(i\) 个元素的数值; \(t_i\) 表示第 \(i\) 个元素被删除的时间(即第 \(i\) 个元 阅读全文
posted @ 2026-01-15 02:47 quanjun 阅读(54) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P14426 解题思路参考自 ningyy大佬的这篇博客 受到博客启发,我按照自己的思路,开两棵线段树解决了本题。 示例程序: #include <bits/stdc++.h> using namespace std; co 阅读全文
posted @ 2026-01-15 00:32 quanjun 阅读(28) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/U650054 三维偏序问题。CDQ分治模板题。 数据范围有点大,需要先离散化一下 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1 阅读全文
posted @ 2026-01-14 22:10 quanjun 阅读(27) 评论(0) 推荐(0)
摘要: 思路全部来自 OI WIKI:https://oi.wiki/graph/dynamic-tree-divide/ 按照自己的码风写了一下。 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; i 阅读全文
posted @ 2026-01-14 00:18 quanjun 阅读(20) 评论(0) 推荐(0)
摘要: 题目链接: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 阅读(22) 评论(0) 推荐(0)
摘要: 题目链接:https://codeforces.com/problemset/problem/1093/E 解题思路来自 oi.wiki 这道题 与其说是 “分块 套 树状数组”,不如说是 “树状数组 套 分块 (再)套 树状数组”。因为分块还需要用树状数组维护一个前缀和。 如果直接 分块 + 树状 阅读全文
posted @ 2026-01-08 23:03 quanjun 阅读(25) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 70 下一页