#P2247. SAC#1 - ACOJ云评测计划
SAC#1 - ACOJ云评测计划
Description
The ACOJ server is in a poor state. Therefore, the SAC problem setter SOL has to require every branch site that is set up by downloading the ACOJ software package to enable the cloud judging service for the main site.
The cloud judging service is connected via a network. The network is bidirectional; however, due to geographic and other constraints, not every pair of servers can be directly connected. The ACOJ main site has obtained the list of pairs that can be directly connected. It contains stations (including the main site) and their connections, based on which tasks can be assigned.
Some station owners are SOL’s diehard fans and will unconditionally offer their servers to SOL. These ACOJ stations are called “good stations.” However, some station owners are SOL “haters.” Although they obtained the ACOJ server program, they do not want to provide resources to SOL and use tricks to turn off the cloud service. In other words, although the main site still regards these stations as present, they are useless — they can neither relay communication nor run judging. These are called “bad stations.”
After thorough investigation, SOL determined that there are at most bad stations in the ACOJ cloud judging system, and these bad stations may make the ACOJ cloud network disconnected. Crisis!
However, SOL cannot determine which stations they are. He asks you to find any set of stations, of size up to , whose removal would make the network disconnected, so that precautionary measures can be taken.
Input Format
The input contains lines.
- Line : three integers .
- The next lines: each contains two integers , meaning stations and can be directly connected.
Output Format
The output contains line.
Output at most integers, representing any set of vertices whose removal disconnects the original graph.
Because a Special Judge is used, the order of the vertices does not matter. You only need to ensure that the original graph can be disconnected.
If no such set of stations exists, output How oversuspicious you are, SOL!. If the network is already disconnected even when there are no bad stations, output Poor SOL!.
4 4 2
1 2
2 3
3 4
4 1
1 3
4 6 2
1 2
2 3
3 4
4 1
1 3
2 4
How oversuspicious you are, SOL!
4 0 2
Poor SOL!
Hint
- For of the testdata, .
- For another of the testdata, , .
- For another of the testdata, , .
- For of the testdata, , , ; the cloud network has no self-loops or multiple edges.
Translated by ChatGPT 5
京公网安备 11011102002149号