摘要: bool cmp(int x,int y){ return dfn[x]<dfn[y]; } void build(){ sort(h+1,h+1+k,cmp); q[top=1]=1,g.h[1]=0,g.k=0; for(int i=1;i<=k;i++){ if(h[i]==1) contin 阅读全文
posted @ 2022-10-28 14:41 hubingshan 阅读(14) 评论(0) 推荐(0)
摘要: struct TU{ int k,h[N]; TU(){k=0;memset(h,0,sizeof(h));} struct AB{ int a,b,c,n; }d[N*2]; void cun(int x,int y,int z){d[++k]=(AB){x,y,z,h[x]},h[x]=k;} 阅读全文
posted @ 2022-10-28 12:12 hubingshan 阅读(16) 评论(0) 推荐(0)