TaphoL4ACM
TaphoL4ACM
全部文章
分类
归档
标签
去牛客网
登录
/
注册
TaphoL4ACM的博客
全部文章
(共19篇)
题解 | 【模板】序列操作 | vector实现序列&List实现序列&随机数种子实现随机
#include <iostream> // vector 所需库 #include <vector> #include <algorithm> // list 所需库 #include <list> #include <iterator>...
2026-05-06
1
12
题解 | 平方根 | 牛顿迭代法
class Solution { private: static constexpr double eps=1e-6; public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求非负整数 n 的平方根...
2026-05-05
1
10
题解 | 无限长正整数排列字符串 | 按位分组定位法
#include <iostream> #include <string> #include <cmath> using namespace std; using ll=long long; int main() { ios::sync_with_std...
2026-05-05
1
12
题解 | 校门外的树 | 差分法
#include <iostream> #include <vector> using namespace std; int main(){ ios::sync_with_stdio(false);cin.tie(nullptr); int len;cin&...
2026-05-04
1
11
题解 | 二维斐波那契数列 | 费马小定理优化组合数计算
#include <iostream> #include <vector> using namespace std; using ll=long long; const ll MOD=1e9+7; vector<ll> fact,invFact; // 带模快...
2026-05-04
1
14
题解 | 牛牛学数列5 | 矩阵运算+快速幂+运算符重载
#include <iostream> #include <array> using namespace std; using ull = unsigned long long; // 2*2方阵 struct MatrixSq2{ array<array&l...
2026-05-04
1
11
题解 | 素数判断 | 试除法的6k±1优化法
#include <iostream> using namespace std; // 优化方向:缓存/埃氏筛、线性筛/Miller-Rabin算法 // 当前算法是试除法的6k±1优化法 bool isPrime(int n){ if(n<2) return false...
2026-05-04
1
11
题解 | 牛牛学数列5 | 矩阵乘法+快速幂优化
#include <iostream> #include <array> using namespace std; using ll = long long; // 2*2方阵 struct MatrixSq2{ array<array<ll,2>...
2026-05-01
1
18
题解 | 计算阶乘 | 惰性缓存策略
#include <iostream> #include <array> using namespace std; using ll = long long; const int MOD = 1e9 + 7; const int MAX_N = 1e6 + 1; array...
2026-05-01
1
15
首页
上一页
1
2
下一页
末页