割边(桥)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给出个点条边的无向图,求图中桥(割边)的数量。

桥(割边)的定义:若删去一条边使得图中连通块数量增加,则称这条边为桥(割边)。 图中黑色加粗边是树边

输入格式

输入文件包含若干组数据。

每组数据的首行有两个数nnmm

以下mm行每行用两个整数x,yx,y描述无向边 。

输出格式

每组数据输出一个数,表示割边的数量

2 1
1 2
1

数据规模与约定

n,m30000n,m \le 30000

Day1A.割点与割边

Not Claimed
Status
Done
Problem
18
Open Since
2026-1-26 0:00
Deadline
2026-3-31 23:59
Extension
24 hour(s)