银河护胃队
银河护胃队
全部文章
分类
归档
标签
去牛客网
登录
/
注册
银河护胃队的博客
全部文章
(共214篇)
题解 | 村村通工程
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m; int fa[N]; void pre(){ for(int i=1;i<=n;i++){ fa[i]=i; } ret...
2026-03-09
1
24
题解 | 【模板】有依赖的背包问题
#include<bits/stdc++.h> using namespace std; const int N=1e4+10; int n,m,money; int c[N],d[N]; int w[N],v[N]; int fa[N]; int dp[N]; void pre(...
2026-03-09
1
26
题解 | 【模板】并查集
#include<bits/stdc++.h> using namespace std; const int N=5e5+10; int n,q; int op; int fa[N]; int nums_node[N]; void pre(){ for(int i=1;i<...
2026-03-09
1
25
题解 | (详细注解)甜蜜的博弈
#include<bits/stdc++.h> using namespace std; int T; int n; void solve(){ /* k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 获胜方 A A B...
2026-03-08
1
26
题解 | 小红的皇后
#include<bits/stdc++.h> using namespace std; const int N=2e3+10,INF=0x3f3f3f3f; int n,m; char g[N][N]; int dp[N][N][3]; void solve(){ if(n...
2026-03-08
0
30
题解 | 小红的暑假
#include<bits/stdc++.h> using namespace std; const int N=400,MOD=1e9+7; int dp[N][N][N][4]; //dp[i][j][k][l]表示 和第一个朋友玩了i天和第二个朋友玩了j天和第三个朋友玩了k天,l...
2026-03-07
1
41
题解 | (一看就会!)详细注解
#include<bits/stdc++.h> using namespace std; const int N=1e3+10,INF=1e9; int n,m,a[N][N]; int g[N][N],dp[N][N];//dp[i][j] 记录在(i,j)位置的最大money ...
2026-03-07
6
33
题解 | 保证看代码就懂!!(我是大富翁xixi)
#include<bits/stdc++.h> using namespace std; const int N=5e3+10; int n,m; int a[N]; bool dp[N][N]; //dp[i][j] 表示第i次跳跃能否到达位置j 能到达则标记为true,否则标记为...
2026-03-06
2
27
题解 | 小红删数字
#include<bits/stdc++.h> using namespace std; const int N=2e5+10,mod=10,MOD=1e9+7; int n; int a[N]; vector<int> dp(11,0); void solve(){ ...
2026-03-06
1
30
题解 | 切割 01 串 2.0
#include<bits/stdc++.h> // 包含所有常用标准库,竞赛中常用 using namespace std; // 定义常量,数组最大长度 const int N=600; // 全局变量声明 int n,L,R; // n:字符串长度 L/R:...
2026-03-06
1
38
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页