report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Bridge - MarisaOJ: Marisa Online Judge

Bridge

Time limit: 1000 ms
Memory limit: 256 MB
Given a simple, undirected graph with $n$ vertices and $m$ edges. Find all bridges. ### Input - The first line contains 2 integers $n,m$. - The next $m$ lines, each line contains two integers $u, v$, there is an edge between $u$ and $v$. ### Output - Print the number of bridges on the first line. - Print the bridges indices (as input order) in ascending order on the second line. ### Constraints - $1 \le n,m \le 10^5$. - $1 \le u,v \le n$. ### Example Input: ``` 6 5 1 3 2 3 3 4 4 5 4 6 ``` Output: ``` 5 1 2 3 4 5 ```
Articulation point and bridge
Articulation point
Bridge
Articulation point and bridge
Bridge Minimization
Unique path
Topic
Graph
Rating 1100
Solution (0) Solution