摘要:
当n∈【30,40】可以考虑下 复杂度大概是O(2^(n/2)) 算半个模板题吧 某位机房大佬(折半+STL) #include<bits/stdc++.h> using namespace std; long long n,m,w[101],mid,a[1<<20],b[1<<20],sum1,s 阅读全文
摘要:
原题在此 某位大佬用线段树做的 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int N=3e5+7; inline int read(){ i 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int sum,tree[300005],ll[300005],rank[300005],n; struct Node{ int num,val; 阅读全文
摘要:
#include<iostream> #include<cstdio> using namespace std; int a[100001]={0}; int dg_sort(int l,int r){ int mid=a[(l+r)/2]; int i=l,j=r; while(i<=j){ wh 阅读全文