#P1793. 跑步
跑步
Description
New cows arrived at the unit. CG requires them to go for a morning run every day, from Farm to Farm . Between Farm and Farm there are intersections, which are numbered: Farm is number , Farm is number , and the intersections are numbered . There are many routes from Farm to Farm . CG notices that some intersections are must-pass, meaning every route goes through them. CG wants to record them, so CG can go to such an intersection first to check whether the new cows are slacking. Your task is to find all must-pass intersections.
Input Format
The first line contains two integers and separated by a space.
From line to line , each line contains two integers and separated by a space, indicating that there is a direct path between intersection and .
The input guarantees that must-pass intersections exist, and every intersection is connected to both Farm and Farm .
Output Format
The first line contains an integer , the number of must-pass intersections.
On the second line, output the indices of all must-pass intersections in increasing order, with a single space between every two numbers.
6 6
1 2
2 4
2 3
3 5
4 5
5 6
2
2 5
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号