ICode9

精准搜索请尝试: 精确搜索
  • 洛谷P1656 炸铁路 (求割边)2022-06-03 12:02:06

    用tarjan变种求割边的模板题 其实还可以求出所有的边双(用栈),但本题不需要求。 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+10; 4 int head[N],nxt[N<<1],to[N<<1],tot; 5 pair<int,int> edge[N]; 6 int dfn[N],low[N],top/*st[N]*/; 7 int cnt,i

  • P1656 炸铁路2022-04-02 18:03:43

    题目传送门 知识点 无向图边双连通分量模板 \(vector+PII\)的自定义排序 #include <bits/stdc++.h> using namespace std; const int N = 5010, M = 20010; typedef pair<int, int> PII; int n, m; int h[N], e[M], ne[M], idx; int dfn[N], low[N], timestamp; int stk[N], t

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有