摘要: 重点补充一下 dp 和 字符串的营养,其他的一些 交给队友好了 下面是很棒的一些视频讲解 电子科大ACM视频 https://space.bilibili.com/7711573/#/video 浙师大ACM视频 https://space.bilibili.com/8198319/#/video 阅读全文
posted @ 2018-08-14 23:06 Draymonder 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 直接Copy好了 // 欧拉函数 phi(n) = n * π(1-1/p) ,p为n的质因数 // phi(m*n) = phi(m) * phi(n),nm互质 // phi(i*p) = p*phi(i) ,当i mod p == 0 const int N = 3e6+5; bool vis 阅读全文
posted @ 2018-08-14 22:31 Draymonder 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 根据公式就是 对每次C(n,m) = C(n%p,m%p) * C(n/p,m/p); ll pow(ll x,ll n) { ll res = 1; x%=mod; while (n) { if(n&1) res = res*x%mod; x = x*x %mod; n >>=1; } retur 阅读全文
posted @ 2018-08-14 22:29 Draymonder 阅读(1031) 评论(0) 推荐(1) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1348 给一个半径和n个点 求圆的周长 + n个点的凸包的周长 #include<bits/stdc++.h> using namespace std; const int maxn = 1005; co 阅读全文
posted @ 2018-08-14 22:23 Draymonder 阅读(133) 评论(0) 推荐(0) 编辑
摘要: poj 3468 给出N个数,Q次操作。有两种操作类型 1. 在区间 [L,R] 加上一个整数v 2. 区间[L,R]查询。 区间查询 区间更新 #include<iostream> #include<string.h> using namespace std; #define ls rt<<1 # 阅读全文
posted @ 2018-08-14 21:47 Draymonder 阅读(229) 评论(0) 推荐(0) 编辑