chenlan114
chenlan114
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
chenlan114的博客
全部文章
(共83篇)
题解 | 连分数
#include<bits/stdc++.h> using namespace std; using ll=long long; void solve(ll P,ll Q){ cout<<P<<'/'<<Q<<" = &...
2026-03-08
0
66
题解 | Rinne Loves Edges
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5,inf=9e18; struct E{ ll u,w; }; ll n,m,s; vector<vector&...
2026-03-07
0
70
题解 | 不点两面(hard version)
#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,q; ...
2026-03-06
0
74
题解 | 多米诺骨牌
阶段 1:输入处理与数据预处理目标:读取输入数据,并将物体按位置排序,保证从左到右处理区间。操作:读取多组测试用例(T 组),每组先读物体数量 n、选取组数 m;按题目要求的输入顺序:先批量读取所有物体的高度 h,再批量读取所有物体的位置 x;将每个物体的 (x, h) 封装为结构体,按位置 x 升...
2026-03-04
1
73
题解 | 小苯的最大和
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll N=2e5+5; vector<ll>a; vector<ll>f; int main() { ios...
2026-03-03
0
74
题解 | 隐匿社交网络
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; ll ans; // 存储每组测试用例的最大连通分量大小 // 并查集(Union-Find)节点结构体:用于管理二...
2026-02-25
0
92
题解 | 【模板】并查集
#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
76
题解 | 图论
#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
73
题解 | 数组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
121
题解 | 戏志才
#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
69
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页