会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
劝君
渭城朝雨浥轻尘,客舍青青柳色新。劝君更尽一杯酒,西出阳关无故人。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
10
11
12
13
14
15
16
17
18
···
60
下一页
2024年2月20日
ABC306 E - Best Performances 题解 离散化+线段树/splay tree
摘要: 题目链接:https://atcoder.jp/contests/abc306/tasks/abc306_e 题目大意: 有一个长度为 \(N\) 的序列 \(A = (A_1, A_2, \ldots, A_N)\),以及一个整数 \(K\)。 初始时序列 \(A\) 的所有元素的数值均为 \(0
阅读全文
posted @ 2024-02-20 16:26 quanjun
阅读(45)
评论(0)
推荐(0)
2024年1月25日
洛谷P8435 【模板】点双连通分量 题解
摘要: 题目链接:https://www.luogu.com.cn/problem/P8435 解题思路完全参考自 Jeremiahy 大佬的博客 。特别是文章的最后一部分。 (系统维护,博客点不进,那先直接进 https://www.luogu.com.cn/problem/solution/P8435)
阅读全文
posted @ 2024-01-25 01:07 quanjun
阅读(77)
评论(0)
推荐(0)
2024年1月15日
abc336 E - Digit Sum Divisible 题解 数位DP
摘要: 题目链接:https://atcoder.jp/contests/abc336/tasks/abc336_e 题目大意: 我们定义一个整数 \(n\) 的 数位和 为 \(n\) 的十进制表示中的各位上的数字之和。比如:整数 \(2024\) 的数位和为 \(2 + 0 + 2 + 4 = 8\)。
阅读全文
posted @ 2024-01-15 19:10 quanjun
阅读(292)
评论(0)
推荐(0)
2024年1月9日
洛谷P1250 种树 题解 差分约束求最小解集
摘要: 题目链接:https://www.luogu.com.cn/problem/P1250 题目大意:略 解题思路:差分约束 求 最长路。 关于为什么求最长路可以看一下这边博客:《关于差分约束系统中跑最长路还是最短路的澄清》 博客的核心思想就是一句话: 要想求最小解集跑最长路;要想求最大解集跑最短路。
阅读全文
posted @ 2024-01-09 12:25 quanjun
阅读(56)
评论(0)
推荐(0)
2024年1月4日
CF295B Greg and Graph 题解 floyd性质题
摘要: 题目链接:https://codeforces.com/problemset/problem/295/B 题目描述可参见 洛谷 解题思路完全来自 aiiYuu巨佬的博客 一道很好地利用了 floyd 算法性质的题目。 floyd算法 示例程序: #include <bits/stdc++.h> us
阅读全文
posted @ 2024-01-04 16:09 quanjun
阅读(38)
评论(0)
推荐(0)
2024年1月3日
洛谷P3385 SPFA判负环
摘要: 题目链接:https://www.luogu.com.cn/problem/P3385 解题思路:完全参考自 MoonSkyy大佬的博文 核心思想: \(cnt_u\) 表示起点到 \(u\) 的最短路所经过边数,如果 \(cnt_u \ge n\) 则说明路径至少包含 \(n\) 条边 \(n+1
阅读全文
posted @ 2024-01-03 20:13 quanjun
阅读(68)
评论(0)
推荐(0)
HDU2544 最短路 题解 Bellman-Ford算法
摘要: 题目链接:https://acm.hdu.edu.cn/showproblem.php?pid=2544 题目大意:一道简单的最短路。主要是记录一下 bellman-ford 算法的实现。 示例程序(bellman-ford): #include <bits/stdc++.h> using name
阅读全文
posted @ 2024-01-03 16:42 quanjun
阅读(43)
评论(0)
推荐(0)
2023年12月26日
洛谷B3611 【模板】传递闭包 floyd/bitset
摘要: 目录floydbitset优化 题目链接:https://www.luogu.com.cn/problem/B3611 参考题解:https://www.luogu.com.cn/blog/53022/solution-b3611 floyd #include <bits/stdc++.h> usi
阅读全文
posted @ 2023-12-26 18:02 quanjun
阅读(105)
评论(0)
推荐(0)
洛谷B3647 【模板】Floyd 题解 floyd算法 求 多源多汇最短路
摘要: floyd主要解决的问题: 多源多汇最短路:https://www.cnblogs.com/quanjun/p/17928959.html 传递闭包:https://www.cnblogs.com/quanjun/p/17928980.html 最小环:https://www.cnblogs.com
阅读全文
posted @ 2023-12-26 17:52 quanjun
阅读(370)
评论(0)
推荐(0)
P1339 [USACO09OCT] Heat Wave G 最短路入门题 Dijkstra/SPFA/Dijkstra+优先队列优化
摘要: 目录朴素的 Dijkstra 算法SPFA 算法Dijkstra + 优先队列优化 题目链接:https://www.luogu.com.cn/problem/P1339 题目大意:无向图有单源最短路。 朴素的 Dijkstra 算法 时间复杂度 \(O(n^2)\)。 #include <bits
阅读全文
posted @ 2023-12-26 17:27 quanjun
阅读(55)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
15
16
17
18
···
60
下一页
公告