上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 32 下一页
摘要: 基础的快速幂和高精度应用数位不会求只能百度#include #include #include using namespace std;typedef long long ll;const int MAXN = ... 阅读全文
posted @ 2018-07-31 18:56 张浦 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 枚举T次下一个排列有STL就很好写但是没有STL岂不是凉凉#include #include using namespace std;const int MAXN = 1e4 + 10;int arr[MAXN]... 阅读全文
posted @ 2018-07-31 16:09 张浦 阅读(70) 评论(0) 推荐(0) 编辑
摘要: emmmXJB算法暴力DFS980ms擦线过私以为不是正确做法…#include using namespace std;typedef long long ll;ll n, k;ll ans = 0;void... 阅读全文
posted @ 2018-07-31 15:37 张浦 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 这道题上来没啥思路也读不懂题有天听巨巨说是个栈操作然后又放了几天 突然就把题读懂了知道是个栈就特别简单了…注意运算顺序就行 #include #include using namespace std;type... 阅读全文
posted @ 2018-07-31 15:30 张浦 阅读(103) 评论(0) 推荐(0) 编辑
摘要: AC了可是为什么AC呢?#include #include using namespace std;typedef long long ll;ll gcd(ll a, ll b){ return b ? g... 阅读全文
posted @ 2018-07-31 12:44 张浦 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 最早的想法是推公式愣是没推出来菜逼只能暴力前缀和加二分前缀和不用算完由题意算到一半多点就可以了二分的时候要注意边界#include using namespace std;const int MAXN = 2e6... 阅读全文
posted @ 2018-07-31 12:11 张浦 阅读(78) 评论(0) 推荐(0) 编辑
摘要: P3383 线性筛素数 重复筛 bool check[maxn]; ll n, m; void initprime() { check[1] = check[0] = true; for(int i = 2; i <= n; i ++) { if(!check[i]) { for(int j = 2 阅读全文
posted @ 2018-07-30 17:18 张浦 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 题目描述有些人心如花木,皆向阳而生|《剑来》zz很喜欢数学,但是他又是一个数学渣,我们称这种生物叫做学渣,zz又碰到了一个数学小问题,定义一个函数P (x)例如:P (123) = 1! ∗ 2! ∗ 3! 现在... 阅读全文
posted @ 2018-07-29 17:09 张浦 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 模拟链表#include using namespace std;const int MAXN = 1e5 + 10;int head = 1;struct num{ int right; int l... 阅读全文
posted @ 2018-07-28 14:16 张浦 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 标准并查集求有几个独立区间减一即可#include using namespace std;const int MAXN = 1e4 + 10;int arr[MAXN];void init(int N){ ... 阅读全文
posted @ 2018-07-27 11:01 张浦 阅读(84) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 32 下一页