chenlan114
chenlan114
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
chenlan114的博客
全部文章
(共82篇)
题解 | dd爱框框
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e7+5; ll pre[N]; ll id,n,x; bool check(ll m){ if(pre[id]-pre[m...
2026-04-21
0
9
题解 | 小红树上染色
栈优化的树形dp #include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5,mod=1e9+7; vector<vector<ll>>adj(N); vec...
2026-04-16
0
26
题解 | 小美的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); string s; ...
2026-04-14
0
15
题解 | 圆覆盖
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; ll n,S; struct Y{ double r; ll v; }; Y a[N]; bool c...
2026-04-11
0
24
题解 | 小红的图上加边
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll N = 1e5 + 5; struct UF { ll rank = 0; UF* root; ll w; ...
2026-04-10
0
32
题解 | 绿豆蛙的归宿
想好路径期望怎么计算之后,使用 DFS 记忆化搜索就好 #include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; struct E{ ll id; double w...
2026-04-09
1
32
题解 | 抽卡
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll mod=1e9+7; ll fast_pow(ll a,ll b,ll m){ ll res=1; a%=m; ...
2026-04-08
0
30
题解 | 小苯的麦克斯
#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; ...
2026-04-06
1
38
题解 | 树上行走
用 BFS 加并查集的办法来维护每个可以连通的区块来找到节点最多的连通块即可 #include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=2e5+5; vector<vector<ll...
2026-04-04
0
46
题解 | 1=N
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll N = 3e5; vector<ll> primes; // 存储筛出的所有质数 vector<b...
2026-04-03
0
44
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页