
数学基础
圣帝天龙
菜!刷题啊!刷题不会,看题解啊!看题解看不懂,那就只能唱凉凉了
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
在一定精度后防止四舍五入的方法(HDU6362)
保留6位小数,并且后面的全部舍去,必须防止%.6f造成四舍五入,所以最后结果ans-0.0000005原创 2018-08-11 18:40:18 · 663 阅读 · 0 评论 -
SDNU1085.爬楼梯再加强版(矩阵快速幂+矩阵关系推导)
#include<bits/stdc++.h> using namespace std; const int maxn=3; const int mod=1e9+7; struct mat { long long int m[maxn][maxn]; } ans; mat mul(mat A,mat B) { mat tmp; for(int i=0; i&l...原创 2019-02-14 18:46:30 · 549 阅读 · 0 评论 -
SDNU1068(矩阵快速幂模板)
#include<bits/stdc++.h> using namespace std; const int maxn=3; const int mod=1000000007; struct mat { long long int m[maxn][maxn]; } ans; mat mul(mat A,mat B) { mat tmp; for(int i=0...原创 2019-02-13 16:27:11 · 315 阅读 · 0 评论 -
SDNU1522.陆历川学数学(素数筛求最大因子)
算法思想:每次遇到质数,都将所有以该数字为因子的数的最大编号更新。 【1-1e6】中的所有数字最终更新完毕 线性筛的时间复杂度是O(n) #include<bits/stdc++.h> using namespace std; const int maxn=1e6+5; int n; bool vis[maxn]; int num[maxn]; int top; void p...原创 2019-02-13 21:48:46 · 282 阅读 · 0 评论 -
UVA11384(I - Help is needed for Dexter )
AC代码如下: #include <bits/stdc++.h> using namespace std; const int maxn = 1e3+10; int n,top; int main() { while(~scanf("%d",&n)) { top = 31; while((n>>top) ==...原创 2019-02-19 21:20:08 · 197 阅读 · 0 评论