BeauWill
BeauWill
全部文章
分类
归档
标签
去牛客网
登录
/
注册
BeauWill的博客
全部文章
(共55篇)
题解 | 换个角度思考
Modern Cpp树状数组写法 #include <iostream> #include <vector> #include <array> #include <algorithm> template<typename T> struc...
2026-05-12
1
6
题解 | 分解质因数
贴一个大炮轰蚊子的写法,Miller Rabin & Pollard Rho #include <iostream> #include <vector> #include <array> #include <functional> #inclu...
2026-05-06
1
12
题解 | 操作数组
Modern Cpp #include <iostream> #include <vector> #include <numeric> using i64 = long long; int main() { std::ios::sync_with_stdi...
2026-05-04
1
20
题解 | 剪纸游戏
Modern CppFlood Fill模型,考虑bfs。对于每一个四方向连通块,判断左上角和右下角坐标围成范围的格子数量是否等于连通块的数量,答案就是每次判断符合条件累加的结果。 #include <iostream> #include <vector> #include ...
2026-05-02
1
26
题解 | 小红关鸡
Modern Cpp二分写法 #include <iostream> #include <vector> #include <algorithm> #include <iomanip> int main() { std::ios::sync_wi...
2026-05-01
0
21
题解 | 【模板】整数域二分
Modern Cpp #include <iostream> #include <vector> #include <algorithm> int main() { std::ios::sync_with_stdio(false); std::cin.t...
2026-04-30
1
25
题解 | dd爱框框
Modern Cpp二分写法 #include <iostream> #include <vector> #include <algorithm> #include <numeric> using i64 = long long; int main...
2026-04-21
1
25
题解 | 分元宵
Modern Cpp读入a, b, c, d, p,结论就是计算pow(a * b, c * d)对p取模的结果,假设指数部分相乘不会爆__int128,使用快速幂配合龟速乘解决。 #include <iostream> #include <string> #include ...
2026-04-17
1
30
题解 | 计算一年中的第几天
Modern Cpp #include <iostream> #include <array> #include <numeric> int main() { std::ios::sync_with_stdio(false); std::cin.tie(...
2026-04-07
0
46
题解 | 树上行走
手搓一个DSU的板子,根据题意合并类型相同的点,最后找到并查集中集合的最大siz,满足最大siz的都放进答案数组中,最后输出答案数组的大小和内容即可。 #include <iostream> #include <vector> #include <numeric>...
2026-04-04
0
44
首页
上一页
1
2
3
4
5
6
下一页
末页