09 2018 档案

摘要:#include #include using namespace std; int fac[10],a[10]; #define db double db p[10],f[10]; int n,m; void dfs(int now,int remain) { if(now==m) { a[now]=remain; //dfs出 int ... 阅读全文
posted @ 2018-09-27 02:58 BIack_Cat 阅读(236) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; const int mod=13; int a[510][200*100+10]; int x[510],id[201][201]; inline int gcd(int a,int b) { while(b!=0) { in... 阅读全文
posted @ 2018-09-27 02:54 BIack_Cat 阅读(236) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; const int maxn=1e5+10; struct point{ double x,y; void in() { scanf("%lf%lf",&x,&y); } inline point f(point a)const{ ... 阅读全文
posted @ 2018-09-27 02:51 BIack_Cat 阅读(239) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include using namespace std; #define LL long long const int maxn=25; double a[maxn],l[maxn],r[maxn]; double ex,ey; #define dis(x1,y1,x2,y2) hypot(x1... 阅读全文
posted @ 2018-09-27 02:49 BIack_Cat 阅读(306) 评论(0) 推荐(0)
摘要:http://blog.codinglabs.org/articles/linear-algebra-for-recursion.html 另附一个知识点 https://www.zhihu.com/question/35094617 有时间了学学 可能和CCF14F有关系 另介绍一种算法 Berl 阅读全文
posted @ 2018-09-27 02:42 BIack_Cat 阅读(1355) 评论(0) 推荐(0)
摘要:#!/bin/sh # put the code and data in the same folder in="in" #data's inputs file suffix out="out" #Analogy above cpp="a.cpp" # the CPP of yours.BTW you should comment the freopen prog="... 阅读全文
posted @ 2018-09-27 02:12 BIack_Cat 阅读(221) 评论(0) 推荐(0)
摘要:#include using namespace std; const int INF = 0x3f3f3f3f; const int MAXN = 1e5+7; int n,m,k; bool vis[MAXN]; long long dist[MAXN][11]; struct qnode{ int v; int c; qnode(){} qnod... 阅读全文
posted @ 2018-09-27 02:10 BIack_Cat 阅读(261) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; #define LL long long const int maxn=1e3+10; #define inf 0x3f3f3f3f int n,d; int cnt[51]; int t1,t2,t12; double dp[12][12][12]; LL c[51][51]; double df... 阅读全文
posted @ 2018-09-27 02:02 BIack_Cat 阅读(256) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include using namespace std; #define LL long long const int maxn=3e5+10; LL a[maxn]; LL odd[maxn]; LL even[maxn]; LL sum[maxn]; int main() { ... 阅读全文
posted @ 2018-09-27 01:44 BIack_Cat 阅读(314) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include #include using namespace std; #define LL long long const int maxn=2e5+1; int meow[2][2][2]; int x[maxn],y[maxn]; int main() { ... 阅读全文
posted @ 2018-09-23 22:23 BIack_Cat 阅读(316) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; #define LL long long const int maxn=1e5+10; int a[maxn]; int b[maxn]; int main() { // freopen("in.txt","r",stdin); int t; scanf("%d",&t);... 阅读全文
posted @ 2018-09-20 16:38 BIack_Cat 阅读(101) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include using namespace std; #define LL long long int n,m,k; int a[31][31]; int f[31][31]; #define sqr(x) ((x)*(x)) int cal(int avg) { ... 阅读全文
posted @ 2018-09-19 00:50 BIack_Cat 阅读(117) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include using namespace std; #define LL long long void out(LL x) { bitsets(x); couts2) { for(int i=0;cal(d)s2... 阅读全文
posted @ 2018-09-19 00:26 BIack_Cat 阅读(74) 评论(0) 推荐(0)
摘要:先定义一下,数论函数指的定义域是在正整数域下f(1)不等于0的函数。 来自Syu Gau http://www.zhihu.com/question/23764267/answer/26007647 有以下几个概念 1,卷积:设是两个数论函数(也就是说,以自然数集为定义域的复数值函数),则卷积运算定 阅读全文
posted @ 2018-09-17 18:39 BIack_Cat 阅读(302) 评论(0) 推荐(0)
摘要:今天突然想到一种另一种理解素数筛的角度 对于每个数的质因数分解是 x=p1^a1 * p2^a2 * pk^ak 对于一个合数来说 1. k=1,a1>1 2.k>1,a1>=1 那么对于第一种情况,x=p1^a1 只会被 p1^(a1-1)筛去,对于第二种情况,若a1=1,那么会被p2^a2 * 阅读全文
posted @ 2018-09-17 17:30 BIack_Cat 阅读(90) 评论(0) 推荐(0)