#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 nn stations (including the main site) and their mm 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 kk bad stations in the ACOJ cloud judging system, and these kk bad stations may make the ACOJ cloud network disconnected. Crisis!

However, SOL cannot determine which kk stations they are. He asks you to find any set of stations, of size up to kk, whose removal would make the network disconnected, so that precautionary measures can be taken.

Input Format

The input contains m+1m + 1 lines.

  • Line 11: three integers n,m,kn, m, k.
  • The next mm lines: each contains two integers a,ba, b, meaning stations aa and bb can be directly connected.

Output Format

The output contains 11 line.

Output at most kk 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 20%20\% of the testdata, n15n \le 15.
  • For another 20%20\% of the testdata, n100n \le 100, k=1k = 1.
  • For another 20%20\% of the testdata, n100n \le 100, k=2k = 2.
  • For 100%100\% of the testdata, 3n5003 \le n \le 500, k3k \le 3, 2nk2 \le n - k; the cloud network has no self-loops or multiple edges.

Translated by ChatGPT 5