chenlan114
chenlan114
全部文章
分类
归档
标签
去牛客网
登录
/
注册
chenlan114的博客
全部文章
(共23篇)
题解 | 乐团派对
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll N = 1e5 + 5; ll a[N]; // 存储每个乐手的能力值 ll f[N]; // DP数组:f[i]表示前i个乐手能...
2026-01-12
0
6
题解 | 切题之路
#include <bits/stdc++.h> using namespace std; using ll=long long; // 别名定义,简化长整型书写,避免溢出 const ll N=1e5+5; // 定义数组最大容量,适配题目数据范围 // 结构体定义:存储每道...
2026-01-11
0
9
题解 | 岛屿数量
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll N=105; // 数组大小(因为n,m≤100,开105留边界) // 全局变量:存储地图、访问标记、八方向偏移 char g[N]...
2026-01-10
0
9
题解 | 小红的平滑值插值
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll N=1e5+5; ll a[N]; // 存储输入的数组 int main() { // 优化输入输出速度(算法无关,属于编程优...
2026-01-10
0
9
题解 | 牛牛喜欢字符串
#include <bits/stdc++.h> using namespace std; using ll=long long; int main() { // 加速cin/cout的输入输出速度,避免同步带来的延迟 cin.tie(0)->sync_wit...
2026-01-09
0
9
题解 | 【模板】整数域二分
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll N = 2e5 + 5; ll a[N]; // 存储数组元素 ll L, R; // 每次查询的区间左右边界 // 二分条件...
2026-01-08
0
11
题解 | 【模板】完全背包
#include <bits/stdc++.h> using namespace std; using ll =long long; // 将long long别名化为ll,避免整数累加时的溢出问题 const ll N=1e3+5; // 定义背包容量的最大范围:题目中m≤1e...
2026-01-07
0
13
题解 | 完全背包前置题
#include <iostream> using namespace std; using ll = long long; const ll N = 1e3 + 5; ll v[N]; bool dp[N]; // dp[j]表示“能否凑出总价值j”,true为可以,false为不可...
2026-01-07
0
10
题解 | 明日DISCO
#include <iostream> using namespace std; using ll = long long; const ll N=505; ll a[N][N]; // 存储n×n棋盘的数值,数组开至505以适配题目中n≤500的范围 int main() { ...
2026-01-07
0
10
题解 | 小美打怪
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll N = 1e3 + 5; struct M { ll h = 0; // 怪物血量 ll a = 0; // 怪物攻击...
2026-01-05
0
16
首页
上一页
1
2
3
下一页
末页