摘要: #include #include using namespace std;int s[4],p[4];long long llmax(long long a,long long b){ return a>b?a:b;}int main(){ int t; cin>>t; int c=1; whil... 阅读全文
posted @ 2014-04-29 20:59 _一千零一夜 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 没说的 欧拉函数#include#includeusing namespace std;int euler(int x){ int i,res=x; for(i=2;i1) res=res/x*(x-1); return res;}int main()... 阅读全文
posted @ 2014-04-29 15:54 _一千零一夜 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 模线性方程的基本应用#includeusing namespace std;int exgcd(int a,int b,int &x,int &y){ if(b==0) { x=1; y=0; return a; } int d=ex... 阅读全文
posted @ 2014-04-29 15:38 _一千零一夜 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 好高兴 一上午做了2个题 题意:求素因子只有2 3 5 7 数 约束的个数 我用的时搜索计数法 感觉还应该有比较不错的组合数学方法#includeusing namespace std;__int64 dmax;int prime[4];void dfs(int t){ if(t>=4) { ... 阅读全文
posted @ 2014-04-29 11:47 _一千零一夜 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 第一次打表一言难尽 注意表的范围 因为打表 数组长度不好计算算 要有个结尾标志#includeusing namespace std;int prime[1000]={5,7,11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,9... 阅读全文
posted @ 2014-04-29 10:53 _一千零一夜 阅读(239) 评论(0) 推荐(0) 编辑