摘要: 洛谷p4782 #include<iostream> #include<vector> #include<algorithm> using namespace std; const int N=2e6+10; int n,m; int dfn[N],low[N],stk[N],instk[N],to 阅读全文
posted @ 2025-10-05 21:20 xdhking 阅读(8) 评论(0) 推荐(0)
摘要: 后续补充完善 点双连通分量缩点后建的新图点的数量会增加,如果原图是一条链的话每个点双开个新点,加上割点,总点数要开两倍; 无向基环树用拓扑剥叶子的时候,记得防止剥父亲节点的出度 void topsort(){ queue<int> q; for(int i=1;i<=n;i++){ if(dg[i] 阅读全文
posted @ 2025-10-05 15:54 xdhking 阅读(6) 评论(0) 推荐(0)