银河护胃队
银河护胃队
全部文章
分类
归档
标签
去牛客网
登录
/
注册
银河护胃队的博客
全部文章
(共214篇)
题解 | 山峰数组计数
#include<bits/stdc++.h> using namespace std; #define int long long const int N=2e5+10; int n,P[N],sum[N]; void solve(){ int area1,area2,are...
2026-03-03
0
33
题解 | 石子合并
// 引入万能头文件,包含所有常用的STL库(竞赛场景常用) #include<bits/stdc++.h> // 使用std命名空间,避免重复书写std::前缀 using namespace std; // 定义常量:N为区间最大长度,MAX为代价的初始极大值(用于求最小值的初始化...
2026-03-03
1
28
题解 | 食物链计数
// 引入万能头文件,包含所有常用STL库 #include<bits/stdc++.h> // 使用std命名空间,避免重复写std:: using namespace std; // 定义常量N,表示节点数量的最大值(1e5+10) const int N=1e5+10; // ...
2026-03-03
1
34
题解 | 食物链计数
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m; map<int,bool> f_eat; vector<int> plants; vector<int&g...
2026-03-03
0
30
题解 | 没有上司的舞会
#include<bits/stdc++.h> using namespace std; const int N=2e5+10; int n; int f[N],g[N]; vector<int> G[N]; void dfs(int u){ for(int v:G...
2026-03-02
1
30
题解 | 最大学分
#include<bits/stdc++.h> using namespace std; const int N=400; int f[N][N]; int n,m; int ki[N],si[N]; vector<int> G[N]; int dfs(int u){...
2026-03-02
0
45
题解 | 来硬的
#include<bits/stdc++.h> using namespace std; #define int long long const int N=1e6+10,INF=1e16; int n,m; int xi[N],yi[N]; int dp[N][2]; signed...
2026-03-02
0
30
题解 | 小红笔试
#include<bits/stdc++.h> using namespace std; const int N=2e3+10; int n,T; int dp[N][N]; int main(){ // ios::sync_with_stdio(false); // cin.ti...
2026-03-01
0
40
题解 | 【模板】分组背包
#include<bits/stdc++.h> using namespace std; const int N=2e3+10; int n,m; int dp[N]; int main(){ ios::sync_with_stdio(false); cin.tie(0); ...
2026-02-28
1
38
题解 | 【模板】二维费用背包
#include<bits/stdc++.h> using namespace std; #define int long long const int N=60,M=600; int n,t[N],h[N],a[N],T,H; int dp[N][M][M]; void solv...
2026-02-28
1
34
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页