摘要:
#include#include#include#include#include#include#include#includeusing namespace std;#define ll long long intconst int m=9973;ll a[20][20],k;in... 阅读全文
posted @ 2015-08-06 20:42
xryz
阅读(83)
评论(0)
推荐(0)
摘要:
#include#include#includeusing namespace std;const int m=1000000007;int pow_mod(__int64 a,__int64 n,int m){ if(n==0) return 1; __int64 x=... 阅读全文
posted @ 2015-08-06 18:53
xryz
阅读(96)
评论(0)
推荐(0)
摘要:
#include#include#includeusing namespace std;const int m=10000;int fib(int n){ int t[2][2]={1,1,1,0}; int p[2][2]; int a[2][2]={1,0,0,... 阅读全文
posted @ 2015-08-06 13:49
xryz
阅读(114)
评论(0)
推荐(0)
摘要:
1、欧几里德算法int gcd(int a, int b){ return b == 0 ? a : gcd(b , a%b);}int lcm(int a, int b){ return a/gcd(a,b)*b;//防止溢出}2、Eratosthenes筛法int m... 阅读全文
posted @ 2015-08-06 12:44
xryz
阅读(166)
评论(0)
推荐(0)
摘要:
#include#include#includeusing namespace std;int pow_mod(__int64 a,__int64 n,int m){ if(n==0) return 1; __int64 x=pow_mod(a,n/2,m); __... 阅读全文
posted @ 2015-08-06 09:56
xryz
阅读(97)
评论(0)
推荐(0)