#P6571. [BalticOI 2017] Political Development
[BalticOI 2017] Political Development
Description
A political party with members wants to develop some brand-new policies. To do this, the party plans to set up a committee for developing the new policies. Clearly, policies can be developed best when all committee members disagree with each other, and the committee is as large as possible.
To find out which pair of politicians disagree and which pair agree, the party arranges for every possible pair of politicians to discuss a randomly chosen topic. Whenever two politicians cannot reach an agreement on the given topic, they are recorded in the party’s book of merits.
With this book, you are assigned the task of finding the largest committee such that all members disagree with each other. However, finding a large committee is very challenging. Careful analysis of the results shows that for any non-empty subgroup of party members, there exists at least one member in the subgroup who disagrees with strictly fewer than other members in the subgroup. Therefore, the committee cannot have more than members. But can we choose a committee of this size? Find the maximum size of a committee in which no two members agree.
One-sentence summary:
Given a graph such that for any induced subgraph, there exists a vertex with degree less than , find the maximum clique of the original graph.
Input Format
The first line contains two integers and , where is the number of vertices and is as described above.
Each vertex is represented by an integer between and .
The next lines describe vertices , starting from .
Line begins with an integer , followed by integers representing the vertices adjacent to vertex .
Output Format
Output one line containing a single integer, the size of the maximum clique of the original graph.
5 3
2 1 2
3 0 2 3
3 0 1 4
2 1 4
2 2 3
3
5 3
3 1 2 4
1 0
1 0
0
1 0
2
Hint
Constraints and Notes
This problem uses bundled testdata.
- Subtask 1 (4 pts): , .
- Subtask 2 (12 pts): , .
- Subtask 3 (23 pts): .
- Subtask 4 (38 pts): .
- Subtask 5 (23 pts): .
For of the testdata, , .
Notes
Translated from BOI 2017 D1 T1 Political Development.
Translator:
Translated by ChatGPT 5
京公网安备 11011102002149号