摘要:
#include#include#include#includeusing namespace std;#define M 1000010#define ll long longint e[M],ne[M],been[M],v[M],t[M],nn,qu[M],bo,he;ll w[M],dp[M],ans,tot,d[M*2];int n;int inc[M],a1[M*2],an;void add(int x,int y){ ne[++nn]=e[x],v[nn]=y,e[x]=nn;}void solv(int x){ int i; qu[he=bo=1]=x;while(he>= 阅读全文