摘要:
#include#include#include#include#includeusing namespace std;#define maxn 21000int nn,n;int e[maxn],v[maxn],ne[maxn],w[maxn],fa[maxn];void add(int x,int y,int z){ ne[++nn]=e[x],e[x]=nn,v[nn]=y,w[nn]=z;}struct node{ node *ch[2],*pre; int maxx,val,rt;}tree[maxn];node *null;void init(){ memset(e,0,si... 阅读全文