摘要:
#include
#include
#include
#include
using namespace std;
int n, a[30005], c[30005], d[30005], k, vis[30005];
long long b[30005];
int find(int x)
{ int l=1, r=k-1; while(l>1; if(c[m]==x) return m; if(c[m]0) { ret+=b[p]; p-=lowbit(p); } return ret;
}... 阅读全文