随笔分类 -  ACM / 大数

摘要:https://www.luogu.com.cn/problem/P1760 用递归计算移动容易超时,借助公式 2^n - 1当数据太大时,公式无效,算不出大数例如: #include <bits/stdc++.h> using namespace std; int n; stringstream 阅读全文
posted @ 2020-03-27 18:24 Hazelxcf 阅读(144) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; int n; int a[maxn] = {0,1},s[maxn]; int num = 1,alen = 1,jin = 1,slen = 1; int 阅读全文
posted @ 2020-03-25 07:59 Hazelxcf 阅读(400) 评论(0) 推荐(0)
摘要:P1045麦森数 #include<iostream> #include <cmath> #include <cstring> const int maxn = 1e5 + 10; #define int long long using namespace std; //第一个表示位数,之后的数字表 阅读全文
posted @ 2019-11-30 20:45 Hazelxcf 阅读(105) 评论(0) 推荐(0)