上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页
摘要: G07 分解质因数 唯一分解定理 试除法_哔哩哔哩_bilibili P2043 质因子分解 - 洛谷 #include<bits/stdc++.h> using namespace std; int n; int a[10001]; //质因子的个数 void decompose(int x){ 阅读全文
posted @ 2022-09-12 23:37 董晓 阅读(1210) 评论(4) 推荐(3)
摘要: G06 判定质数 试除法_哔哩哔哩_bilibili P5736 【深基7.例2】质数筛 - 洛谷 #include<bits/stdc++.h> using namespace std; bool is_prim(int x){ //判定质数 if(x == 1) return 0; for(in 阅读全文
posted @ 2022-09-12 11:17 董晓 阅读(710) 评论(0) 推荐(0)
摘要: G05 最大公约数 欧几里得算法_哔哩哔哩_bilibili P1029 [NOIP 2001 普及组] 最大公约数和最小公倍数问题 - 洛谷 #include<bits/stdc++.h> using namespace std; typedef long long LL; LL x,y,ans; 阅读全文
posted @ 2022-09-11 16:22 董晓 阅读(949) 评论(0) 推荐(0)
摘要: G04 矩阵加速 P1962 斐波那契数列_哔哩哔哩_bilibili P1962 斐波那契数列 - 洛谷 // O(2^3*logn) #include<bits/stdc++.h> using namespace std; typedef long long LL; const int mod= 阅读全文
posted @ 2022-09-08 22:46 董晓 阅读(1143) 评论(0) 推荐(4)
摘要: G03 P3390【模板】矩阵快速幂_哔哩哔哩_bilibili P3390 【模板】矩阵快速幂 - 洛谷 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int mod=1000000007; str 阅读全文
posted @ 2022-09-08 15:33 董晓 阅读(1519) 评论(0) 推荐(5)
摘要: G02 高精度快速幂_哔哩哔哩_bilibili P1045 [NOIP 2003 普及组] 麦森数 - 洛谷 #include<bits/stdc++.h> using namespace std; const int N=500; typedef vector<int> VI; VI a(N), 阅读全文
posted @ 2022-09-06 16:10 董晓 阅读(1298) 评论(1) 推荐(2)
摘要: G01 快速幂_哔哩哔哩_bilibili P1226 【模板】快速幂 - 洛谷 #include<bits/stdc++.h> using namespace std; typedef long long LL; int a,b,p; int qpow(int a,int b,int p){ // 阅读全文
posted @ 2022-09-04 20:44 董晓 阅读(1243) 评论(0) 推荐(0)
摘要: A04 高精度算法 除法_哔哩哔哩_bilibili P1480 A/B Problem - 洛谷 // 高精度 O(n) #include<bits/stdc++.h> using namespace std; void div(string sa,int b){ int m=sa.size(); 阅读全文
posted @ 2022-09-04 17:37 董晓 阅读(1016) 评论(0) 推荐(1)
摘要: A03 高精度算法 乘法_哔哩哔哩_bilibili P1303 A*B Problem - 洛谷 // 高精度 O(n^2) #include<bits/stdc++.h> using namespace std; void mul(string sa,string sb){ int la=sa. 阅读全文
posted @ 2022-09-04 11:03 董晓 阅读(1374) 评论(0) 推荐(1)
摘要: A02 高精度算法 减法_哔哩哔哩_bilibili P2142 高精度减法 - 洛谷 // 高精度 O(n) #include<bits/stdc++.h> using namespace std; bool cmp(string a,string b){ if(a.size()<b.size() 阅读全文
posted @ 2022-09-04 09:26 董晓 阅读(955) 评论(1) 推荐(1)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页