| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 0 | 0 | 0 | 0.000% |
N (3 ≤ N ≤ 400) fields numbered 1..N are connected by P (1 ≤ P ≤ 10,000) bidirectional pathways. Fields 1 and 2 contain barns. Bessie wants to travel on the paths back and forth between these two barns as many times as possible -- however, she doesn't want to visit any field more than one time in all her trips (except for the fields containing barns). Bessie must visit at least one non-barn field when traveling between the two barns; the input set contains neither "1 2" nor "2 1".
What is the maximum number of trips Bessie can make?
A single integer that is the maximum number of trips that Bessie can make.
7 10 1 3 1 5 1 6 2 4 2 5 2 7 3 4 3 5 5 7 6 7
3