chenlan114
chenlan114
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
chenlan114的博客
全部文章
(共67篇)
题解 | 【模板】并查集
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=5e5+5; struct UF { ll rank=0; UF* root; ll cnt=1; }; U...
2026-02-25
0
31
题解 | 图论
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; ll n,m; // 邻接表存储无向图 vector<vector<ll>>adj(N); /...
2026-02-25
0
31
题解 | 数组4.0
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); ll T; cin...
2026-02-25
0
30
题解 | 戏志才
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; // 邻接表:存储图的边关系 vector<vector<ll>>adj(N); // 访问标记...
2026-02-25
0
32
题解 | 小红的树构造
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); ll n,k; c...
2026-02-24
0
44
题解 | 【模板】单源最短路Ⅰ ‖ 无权图:BFS
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=2E5+5; vector<vector<ll>>adj(N); queue<ll>q; vecto...
2026-02-24
0
43
题解 | 世界树上找米库
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll N = 2e5 + 5,inf=1e9+7; // 全局变量说明: // dist[i]:节点i到最近叶子节点的最短距离,初始为无穷大...
2026-02-24
0
41
题解 | kotori和素因子
#include<bits/stdc++.h> #include <functional> using namespace std; using ll=long long; const ll inf=1145141919810; ll n; vector<ll>a...
2026-02-23
0
42
题解 | 小红的数组操作(hard version)
#include<bits/stdc++.h> using namespace std; using ll=long long; // 输入参数:n=数组长度,p=加x的代价,x=每次加的数值,q=减y的代价,y=每次减的数值 ll n,p,x,q,y; /** * 状态结构体:...
2026-02-22
0
23
题解 | 01序列
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); ll m; cin...
2026-02-21
0
32
首页
上一页
1
2
3
4
5
6
7
下一页
末页