
数论相关
PaigeWw
这个作者很懒,什么都没留下…
展开
-
子集
#include #include using namespace std; int m,n,a[10]; void comb(int k) { if(n<k) return; for (int i=a[k-1]+1; i<=n; i++) { a[k]=i; for (int j=1; j<=k;j++) printf("%原创 2014-08-12 17:49:37 · 484 阅读 · 0 评论 -
zoj 3549 (模运算)
基础模公式: (a+b)%n=((a%n)+(b%n))%n --------------大数取模poj2635 (a-b)%n=((a%n)-(b%n)+n)%n (ab)%n=((a%n)(b%n))%n -------------幂取模zoj3549 ----------------------------------代码--------------------原创 2015-07-31 17:13:06 · 387 阅读 · 0 评论 -
hdu1695((容斥定理+欧拉函数)或(莫比乌斯反演))
http://acm.hdu.edu.cn/showproblem.php?pid=1695 详解:http://blog.youkuaiyun.com/xiaotaoqibao/article/details/5772486 Yoiu can assume that a = c = 1 in all test cases.(最后这句真的是。。。。。。) #include #include #i原创 2015-08-19 16:05:22 · 502 阅读 · 0 评论