As a Sheldor the conqueror, you're supposed to conquer the kingdom of Wonder-blunder-berg, which happens to be a collection of cities connected with roads.

This time you plan to destroy the bridges, which are roads when rendered unusable, splits the kingdom into parts that cannot communicate with each other.

For example,

In the above kingdom, the red roads are bridges.

This is the Adjacency List of the road network of Wonderblunderberg showing which city has a *direct* road to which other city.

How many such bridges exist in the kingdom?

**Clarification:** A *component* is a maximal set of cities such that there is a walk between any two cities of the set. A *bridge* is a road which when removed increases the number of components.

**Try also:** Can you attack cities and conquer?

×

Problem Loading...

Note Loading...

Set Loading...