#P1330. 封锁阳光大学
封锁阳光大学
Description
Cao is a veteran who loves cruising around. During the summer break, he happily cruises through the campus streets of Sunshine University every day. The He Xie (河蟹) feel annoyed seeing happy Cao and decide to lock down Sunshine University so that Cao cannot cruise around.
The campus of Sunshine University is an undirected graph with vertices connected by roads. Each He Xie can block one vertex. When a vertex is blocked, all roads incident to this vertex are blocked, and Cao cannot cruise on those roads. Unfortunately, the He Xie are disharmonious creatures: if two He Xie block two adjacent vertices, they will get into a conflict.
Question: What is the minimum number of He Xie needed to block all roads without any conflicts?
Input Format
The first line contains two positive integers, the number of vertices and the number of edges.
Then lines follow. Each line contains two integers , indicating that there is a road between vertices and .
Output Format
Output a single line. If the He Xie cannot block all roads, output Impossible. Otherwise, output a single integer, the minimum number of He Xie required.
3 3
1 2
1 3
2 3
Impossible
3 2
1 2
2 3
1
Hint
Constraints
For of the testdata, , , and there are no multiple edges.
Translated by ChatGPT 5
京公网安备 11011102002149号