加一条边后最少还有多少个桥,先Tarjan双联通缩点,
然后建树,求出树的直径,在直径起点终点加一条边去的桥最多,
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<stdio.h>
#include<string.h>
#include<stack>
#define N 200001
using namespace std;
int belong[N],head[N],num,ins[N],n,dfs[N],low[N],idx,ans,num1;
struct edge
{
int st,ed,next;
}E[N*10],e[N*10];
void addedge(int x,int y)
{
E[num].st=x;
E[num].ed=y;
E[num].next=head[x];
head[x]=n......
阅读全文