银河护胃队
银河护胃队
全部文章
分类
归档
标签
去牛客网
登录
/
注册
银河护胃队的博客
全部文章
(共214篇)
题解 | 鞋带难题
#include<bits/stdc++.h> using namespace std; const int N=110; vector<set<int>> vs(N); int n,m; bool vis[N]; int main(){ ios::syn...
2026-02-24
0
32
题解 | 旺仔哥哥走迷宫
#include<bits/stdc++.h> using namespace std; const int N=2e5+10; struct Edge{ int u,v; int next; }edge[N*2]; int n,m,t[N],cnt,head[N]; bool...
2026-02-24
1
58
题解 | 图的分类
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int degree[N]; map<int,int> mp; int main(){ ios::sync_with_stdio(fals...
2026-02-24
0
38
题解 | 小红的树上游戏
#include<bits/stdc++.h> using namespace std; const int N=1e4+10; int degree[N],n,x; void solve(){ memset(degree,0,sizeof(degree)); cin&g...
2026-02-24
0
42
题解 | 先序遍历、中序遍历和后序遍历
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,root; vector<int> child[N]; vector<int> l(N+1,0),r(N+1,0); v...
2026-02-23
0
39
题解 | 上司的舞会
#include<bits/stdc++.h> using namespace std; const int N=2e3+10; int n; vector<int> root; vector<int> ad[N]; int dfs(int x){ if(...
2026-02-23
0
33
题解 | 求树的根
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,in[N],out[N]; void add(int u,int v){ edge[++cnt].next=head[u]; edge[...
2026-02-23
0
31
题解 | 【模板】链式前向星
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m,cnt,head[N]; struct Edge{ int u,v,next; }edge[2*N]; void add(int u...
2026-02-23
0
39
题解 | 迷宫问题
#include<bits/stdc++.h> using namespace std; class Pos{ public: int px; int py; Pos* fa; Pos(int px,int py,Pos *father):px(px),py(py),f...
2026-02-23
1
34
题解 | 没挡住洪水
#include<bits/stdc++.h> using namespace std; const int N=1e3+10; int n,area_cnt,fa_area_cnt; int g[N][N]; bool vis[N][N]; int dx[4]={0,1,0,-1}...
2026-02-22
0
29
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页