문제
Farmer John has recently purchased a new farm to expand his milk production empire. The new farm is connected to a nearby town by a network of pipes, and FJ wants to figure out the best set of these pipes to purchase for his use in pumping milk from the farm to the town.
The network of pipes is described by
FJ wants to purchase a single path worth of pipes, where the endpoints of the path are junctions 1 and
SCORING:
Test cases 2-5 satisfy
N,M\le 100.
Problem credits: Brian Dean
입력
The first line of input contains
출력
Please print
예제1
3 2
2 1 2 4
2 3 5 3
428571
In this example, there is only one path from