腌萝卜干
腌萝卜干
全部文章
分类
未归档(199)
题解(4)
归档
标签
去牛客网
登录
/
注册
腌萝卜干的博客
全部文章
(共250篇)
树型 dp + 好理解代码题解 | #Rinne Loves Edges#
子树的决策问题一般都是树形, 定义状态表示表示度数为的点无法到达的最小代价 情况, 切断当前边代价为 情况, 切断子树的某条边代价为 两种取最小值即可 #include <bits/stdc++.h> #define x first #define y second #define...
2026-03-07
1
46
题解 | #相邻的糖果#
贪心 + 双指针 注意到删除后面的糖果数量一定比删除前面的好, 因此贪心的删除后面的糖果, 并且维护当前区间是合法的 算法时间复杂度 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.b...
2026-03-06
0
33
二分 + 饱和乘法 题解 | #幂次进近#
学到个玩意叫饱和乘法 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i128 = __int...
2026-03-06
0
28
好码风题解 | #[P1080] 国王游戏(简化版)#
经典贪心策略 分析交换后产生的差 发现只要按照升序的顺序排序, 得到的就是最多金币的最小值 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() usin...
2026-03-06
0
30
桶维护 | #不点两面(hard version)#
直接用两个桶维护即可, 算法时间复杂度 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i12...
2026-03-06
0
28
易懂题解 | #多米诺骨牌#
将区间按照区间左端点排序, 贪心解决 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i128...
2026-03-04
1
44
最短路 | #小红的数组操作(hard version)#
算法解决最短路 注意要对取模 #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef long long LL; typedef long double LD; t...
2026-02-12
0
56
背包问题变形 | #小红升装备#
背包问题变形 #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef long long LL; typedef long double LD; typedef p...
2026-02-12
0
43
第一篇题解的C++实现 | #ranko的手表#
第一篇题解的C++实现 #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef long long LL; typedef long double LD; type...
2026-02-10
0
56
被dfs坑了 | #小红的rpg游戏#
孩子们别写 #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef long long LL; typedef long double LD; typedef pa...
2026-02-10
0
50
首页
上一页
16
17
18
19
20
21
22
23
24
25
下一页
末页