chenlan114
chenlan114
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
chenlan114的博客
全部文章
(共82篇)
题解 | [P1080] 国王游戏(简化版)
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=65; struct C{ ll a,b; bool operator<(const C& other)...
2026-02-14
0
47
题解 | 【模板】质数判定Ⅱ ‖ 批量查询:线性筛
#include <bits/stdc++.h> using namespace std; using ll=long long; // 简化long long类型书写 const ll MAXN = 20000000; // 质数筛选最大范围 vector<ll> pri...
2026-02-10
0
47
题解 | 文
#include<bits/stdc++.h> using namespace std; using ll=long long; struct B{ string name; double score=0; }; int main(){ ios::sync_with...
2026-02-08
0
49
题解 | 小美的修路
#include<bits/stdc++.h> using namespace std; using ll = long long; /* 算法思想: 这是一个带「必选边」的最小生成树问题,基于Kruskal算法改进 核心逻辑: 1. 题目要求必须包含所有 p=1 的必选边,哪怕它们...
2026-02-08
0
65
题解 | eli和字符串
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll inf=1145141919810; // 初始化无穷大,用于记录最小长度的初始值 int main(){ ios::sync_with...
2026-02-06
0
48
题解 | 【模板】双指针
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll N = 2e5 + 5; // 数组最大长度,适配题目数据范围 ll a[N]; // 存储输入的原数组 us...
2026-02-06
0
59
题解 | 躲藏
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll N = 2e5 + 5, M = 2000120420010122; ll f[N]; int main() { ios::s...
2026-02-02
0
63
题解 | 特殊的科学计数法
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(0),cin.tie(0); string s; cin>>...
2026-01-31
0
65
题解 | 【模板】图的结构Ⅰ ‖ 拓扑排序:Kahn
#include <iostream> #include <vector> #include <queue> using namespace std; using ll = long long; /* 无环有向图 C++ 在竞赛中,1 秒约能处理 10e8 次简...
2026-01-28
0
60
题解 | 游游的二进制树
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e3+5; string s; // 存储每个节点的二进制位(0/1) vector<vector<ll...
2026-01-27
0
52
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页