摘要:
``` include using namespace std; int n,sum; int c[100]; void search(int cur){ if(cur==n) sum++; else for(int i=0;i n){ sum=0; search(0); cout 阅读全文
posted @ 2018-08-15 20:42
ChunhaoMo
阅读(341)
评论(0)
推荐(0)
摘要:
增量构造法,位向量法,二进制法 include using namespace std; void print_sub(int n,int cur){ for(int i=0;i n){ for(int i=0;i 阅读全文
posted @ 2018-08-15 20:38
ChunhaoMo
阅读(344)
评论(0)
推荐(0)
摘要:
先分治再合并 代码 include using namespace std; define ll long long int a[1000],t[1000]; void merge_sort(int A[],int x,int y,int T[]){ if(y x 1){ int m=x+(y x) 阅读全文
posted @ 2018-08-15 17:33
ChunhaoMo
阅读(206)
评论(0)
推荐(0)
摘要:
暴力 O(n方) 前缀和优化O(n n) 分治O(n log(n)) include using namespace std; define ll long long int a[16177216]; ll solve(int l,int r){ if(l==r) return a[r]; int 阅读全文
posted @ 2018-08-15 15:24
ChunhaoMo
阅读(670)
评论(0)
推荐(0)

浙公网安备 33010602011771号