上一页 1 2 3 4 5 6 7 8 9 ··· 57 下一页
摘要: 题目链接:https://www.luogu.com.cn/problem/P1533 解题思路: 主席树求区间第k小模板题 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e7 + 5; const int 阅读全文
posted @ 2025-04-17 18:14 quanjun 阅读(18) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P3466 解题思路完全来自 CodyTheWolf大佬的博客 示例程序: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; mt 阅读全文
posted @ 2025-04-17 16:38 quanjun 阅读(14) 评论(0) 推荐(0)
摘要: 题目链接: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 阅读(22) 评论(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 阅读(17) 评论(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 阅读(13) 评论(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 阅读(31) 评论(0) 推荐(0)
摘要: 题目链接:https://atcoder.jp/contests/abc400/tasks/abc400_d 解题思路: 双端队列BFS(0-1 BFS)参考资料:https://oi.wiki/graph/bfs/#双端队列-bfs 比赛时我是用SPFA写的,然后TLE了一个点,然后用dijkst 阅读全文
posted @ 2025-04-05 22:31 quanjun 阅读(165) 评论(0) 推荐(0)
摘要: 题目链接:https://atcoder.jp/contests/arc084/tasks/arc084_b 题目大意: 找到一个数位和最小的整数,这个整数是 \(K(\le 10^5)\) 的倍数,输出数位和。 解题思路: 观察到任意一个正整数都可以从 \(1\) 开始,按照某种顺序执行乘 \(1 阅读全文
posted @ 2025-04-04 14:18 quanjun 阅读(18) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P2371 参考博客: oi wiki https://oi-wiki.org/graph/mod-shortest-path/ xht大佬的博客 https://www.luogu.com.cn/article/tgfwb 阅读全文
posted @ 2025-04-04 02:55 quanjun 阅读(47) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P3403 参考博客: oi wiki https://oi-wiki.org/graph/mod-shortest-path/ xht大佬的博客 https://www.luogu.com.cn/article/tgfwb 阅读全文
posted @ 2025-04-04 02:48 quanjun 阅读(34) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 57 下一页