Tags:图论


  • [luogu4320]道路相遇 https://www.luogu.org/problemnew/show/P4320
  • [SDOI2018]战略游戏 https://www.luogu.org/problemnew/show/P4606
  • [APIO2018]铁人两项 https://www.luogu.org/problemnew/show/P4630
  • [SHOI2008]仙人掌图
  • [BZOJ4316]小C的独立集
  • [CF487E][UOJ30]Tourists https://www.luogu.org/problemnew/show/CF487E
  • [BZOJ2125]最短路
  • [BZOJ3331]压力
  • [UOJ189]火车司机出秦川
  • [WC2018]通道

至于仙人掌这种毒瘤东西在省选前是不打算学了。
如果省选没有退役的话还有机会学习。

广义圆方树代码

void Min(int &a,int b) {if(b<a) a=b;}
void Tarjan(int x)
{
    dfn[x]=low[x]=++tot;sta[++tp]=x;
    for(int i=A.head[x],R=A.a[i].to,k,lst;i;i=A.a[i].next,R=A.a[i].to)
        if(!dfn[R])
        {
            Tarjan(R);Min(low[x],low[R]);
            if(low[R]>=dfn[x])
                for(k=sta[tp],lst=0,B.link(++node,x);lst!=R;)
                    B.link(node,k),lst=k,k=sta[--tp];
        }
        else Min(low[x],dfn[R]);
}

相关文章:

  • 2022-02-23
  • 2021-05-31
  • 2021-11-19
  • 2021-06-17
  • 2022-12-23
  • 2021-11-15
  • 2022-02-06
  • 2021-10-30
猜你喜欢
  • 2021-05-25
  • 2021-11-27
  • 2021-08-11
  • 2022-12-23
  • 2021-08-16
相关资源
相似解决方案