Weather conditions

Weather conditions

The system oflowcost airlinesOlympAirwayswasdesignedsothatat anyairportwhichis served bythe airlinecouldflytoany otherairport, using,perhaps morethanoneflight.Eachflightconnects thetwo airportsand runs inboth 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 A to B, using only aircraft to OlympAirways. To investigate such situations the research department of the company introduced the concept of vulnerability between a pair of airports A and 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 B to A.

Write a programthataccording to informationon allroutesthat runairline todeterminethe sum ofthe vulnerability ofcommunicationsbetweenallpairs ofairports.


The firstline containsan integerN (1N100) – the number ofairportsserved byairlines.The secondlinecontainsan integerM (1M4950) – the number of flightsthatrunairline.Eachofthe followingMlinesdetermines theflight, whichis representedby a pairof integersfrom1toN - numberof airports, whichitconnects.


Print one integer -the totalnumber ofvulnerabilitiesbetweenalldifferentpairs ofairportsA andB,suchthat thenumber ofAis less thanthe numberofB.

Time limit 0.1 seconds
Memory limit 64 MiB
Input example
1 2
4 2
4 5
3 2
3 1
Output example
Author Vladimir Tkachuk
Source 2004 XVII All-Ukrainian Informatics Olympiad, Kharkov, March 28 - April 3, Round 1