大时代1105
大时代1105
全部文章
题解
归档
标签
去牛客网
登录
/
注册
大时代1105的博客
全部文章
/ 题解
(共12篇)
题解 | #加减#
思路 贪心 + 前缀和优化 + 滑动窗口优化 过程 代码 #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int N = 1e5...
2025-04-19
0
8
题解 | #ruby和薯条#
思路 排序 + 二分/双指针 过程 代码 c++ c++ #include <iostream> #include <algorithm> using namespace std; using LL = long long; const int N =...
2025-04-06
0
21
题解 | #小红的子串#
思路 滑动窗口 + 前缀和 过程 代码 #include <iostream> #include <string> #include <cstring> using namespace std; const int N = 2e5 + 10; int ...
2025-04-05
0
19
题解 | #宵暗的妖怪#
思路 线性dp 过程 代码 #include <iostream> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n, a[N]; LL f[N]; int main() { ...
2025-04-04
0
21
题解 | #春游#
思路 贪心 过程 代码 #include <iostream> #include <climits> using namespace std; typedef long long LL; LL t, n, a, b; int main() { cin &...
2025-03-23
0
17
题解 | #消减整数#
思路 贪心 过程 代码 #include <iostream> using namespace std; int t, h; int func() { h --; int ans = 1, a = 1; while(h) { i...
2025-03-18
0
18
题解 | #体操队形#
思路 dfs 过程 代码 #include <iostream> #include <unordered_map> using namespace std; int a[20], n, ans; bool st[20]; void dfs(int pos) { ...
2025-03-17
0
23
题解 | #空调遥控#
思路 暴力枚举 排序 + 二分 排序 + 滑动窗口 过程 时间复杂度: 时间复杂度: 时间复杂度 代码 排序 + 二分 #include <iostream> #include <climits> #include <algorithm> using ...
2025-03-15
0
20
题解 | #[NOIP2001]装箱问题#
思路 01背包 过程 代码 #include <iostream> using namespace std; const int N = 40, M = 2e4 + 10; int a[N], f[M]; int V, n; int main() { cin >...
2025-03-13
0
19
题解 | #分组#
思路 暴力枚举 + 二分优化 过程 代码 #include <iostream> #include <unordered_map> using namespace std; const int N = 1e5 + 10; int a[N]; int n, m; un...
2025-03-04
0
22
首页
上一页
1
2
下一页
末页