腌萝卜干
腌萝卜干
全部文章
题解
未归档(199)
归档
标签
去牛客网
登录
/
注册
腌萝卜干的博客
全部文章
/ 题解
(共7篇)
题解 | #小红的部分不同字符串#
假设每个条件都是向连接一条边, 那么最终构成的是基环树森林 对于一个元环, 假设有个颜色, 求染色方案数, 首先将环展开为链, 那么方案数为 最后一个位置还需要和第一个位置链接起来 假设元环的染色方案记为 假设位置颜色和位置不同, 那么位置的颜色, 那么就是前个位置染色, 方案数是 假设位置...
C++
动态规划
数学
2026-04-13
2
35
AtCoder Beginner Contest 453 (A ~ E)题解
A 语法 字符串只能操作back, 可以将字符串操作后恢复 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() #define vec1(T, name...
C++
C
哈希表
数学
深度优先搜索
字符串
动态规划
广度优先搜索
2026-04-12
0
37
ABC 452和每日一题的双指针解法
A #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() #define vec1(T, name, n, val) vector<T> na...
C++
C
2026-04-05
1
38
AtCoder Beginner Contest 451 题解
A 注意别把是否违法搞反, 直接模拟即可 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() #define vec1(T, name, n, val)...
C++
C
2026-03-29
1
64
题解 | #Nowcoder Weekly Contest#
A 直接模拟即可 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i128 = __int12...
C++
C
字符串
贪心
动态规划
哈希表
数组
2026-03-09
1
44
AtCoder Beginner Contest 448 题解
A 直接模拟即可 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i128 = __int1...
C++
C
2026-03-08
3
68
牛客周赛126题解
A 分类讨论即可 #include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() using namespace std; using i128 = __int1...
C++
C
字符串
数学
哈希表
动态规划
深度优先搜索
2026-03-07
0
46