小男娘
小男娘
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
小男娘的博客
全部文章
(共44篇)
题解 | 二维斐波那契数列
发现答案等于二维路径计数,可以直接用组合数计算,复杂度 #include <iostream> using namespace std; const int MOD = 1e9 + 7; using ll = long long; ll Pow(ll a, int b) { ...
2025-11-18
0
28
题解 | 奶牛排排站
暴力康托展开/逆康托展开即可。时间复杂度 #include <algorithm> #include <array> #include <bitset> #include <iostream> #include <numeric> #in...
2025-11-18
3
35
题解 | 收集纸片
暴力枚举每种方案,复杂度 #include <algorithm> #include <climits> #include <cstdlib> #include <iostream> #include <utility> #include ...
2025-11-17
0
32
题解 | 小红的扫雷游戏
枚举每一种解,检查是否符合条件即可。解最多只有 216=65536 种,检查也只需要检查 16 个格子每个周围至多 9 个格子,效率完全可以接受。 #include <bitset> #include <iostream> #include <array> usi...
2025-11-16
0
29
首页
上一页
1
2
3
4
5
下一页
末页