摘要:
题目链接:https://www.luogu.com.cn/problem/P2161 题目大意: 你需要维护一个在数轴上的线段的集合 \(S\),支持两种操作: A l r 表示将 \(S\) 中所有与线段 \([l,r]\) 相交的线段删去,并将 \([l,r]\) 加入 \(S\) 中。 B 阅读全文
posted @ 2025-04-15 18:34
quanjun
阅读(14)
评论(0)
推荐(0)
摘要:
题目链接:https://www.luogu.com.cn/problem/P3871 解题思路: FHQ Treap模板题,只涉及插入和 kth 操作。 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 2e5 阅读全文
posted @ 2025-04-15 18:16
quanjun
阅读(13)
评论(0)
推荐(0)
摘要:
题目链接:https://www.acwing.com/problem/content/2439/ 解题思路: 翻转,加懒惰标记 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; mt19937 阅读全文
posted @ 2025-04-15 14:27
quanjun
阅读(11)
评论(0)
推荐(0)
摘要:
题目链接:https://www.luogu.com.cn/problem/P3369 FHQ Treap 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; mt19937 rng(time(0 阅读全文
posted @ 2025-04-15 13:16
quanjun
阅读(23)
评论(0)
推荐(0)
浙公网安备 33010602011771号