eolymp
bolt
Try our new interface for solving problems
Məsələlər

Weather conditions

Weather conditions

The system of low cost airlines \textbf{OlympAirways} was designed so that at any airport which is served by the airline could fly to any other airport, using, perhaps more than one flight. Each flight connects the two airports and runs in both directions. There is a problem that some flights to certain times can not be executed due to bad weather conditions. Thus it is likely that the client can not fly from airport \textbf{A} to \textbf{B}, using only aircraft to \textbf{OlympAirways}. To investigate such situations the research department of the company introduced the concept of vulnerability between a pair of airports \textbf{A} and \textbf{B}. This number equals the number of airline flights, cancellation of any of them (provided that all other flights performed in the usual way) would make it impossible trip to the airport from the airport \textbf{B} to \textbf{A}. Write a program that according to information on all routes that run airline to determine the sum of the vulnerability of communications between all pairs of airports. \InputFile The first line contains an integer \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{100}) -- the number of airports served by airlines. The second line contains an integer \textbf{M} (\textbf{1} ≤ \textbf{M} ≤ \textbf{4950}) -- the number of flights that run airline. Each of the following \textbf{M} lines determines the flight, which is represented by a pair of integers from \textbf{1} to \textbf{N} - number of airports, which it connects. \OutputFile Print one integer - the total number of vulnerabilities between all different pairs of airports \textbf{A} and \textbf{B}, such that the number of \textbf{A} is less than the number of \textbf{B}.
Zaman məhdudiyyəti 0.1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
11
13
2 10
10 6
8 11
2 4
11 10
5 4
6 11
8 2
9 4
11 2
1 7
7 4
1 3
Çıxış verilənləri #1
102
Müəllif Vladimir Tkachuk
Mənbə 2004 XVII All-Ukrainian Informatics Olympiad, Kharkov, March 28 - April 3, Round 1