-->
当前位置:首页 > 题库

PROGRAMMING:Friends group

Luz5年前 (2021-05-10)题库454
Base friend refers to the intimate relationship between men. For the new generation of young people, Jiyou are often used in the pace of life, or get along well with the same sex, so there is a new generation of words: "good Jiyou, a lifetime", "good Jiyou, a lifetime together" and so on. Every weekend, about a few friends, drink wine, eat chicken, man's happiness is so simple. Now there is a problem. A girl wants to count the size of her boyfriend's group. She needs your help. What is the friendship group? The men in the circle are good friends.
###Input format:
Enter two numbers in the first line, N, m, n means how many men there are in total, n < 200, number from No. 1, m means there are many good relationships between couples.
In the next M line, each line gives two numbers, indicating that there is a good relationship between the two.
Next, enter a number T, which means how many rows to judge, T < 100
For the next t line, enter as follows:
```
K ID1 ID2 …… IDK
```
K is the number of people in the circle of friends. The last k data are the numbers of people in the circle of friends.
###Output format:
For group t query, output judgment conclusion in one line. If it's the largest group (not included in any group), output 'yes'. If it's the largest group, output' not maximum '. If it's not the largest group, output' not a clique '``
###Input example:
Here is a set of inputs. For example:
```in
4 4
1 2
1 3
2 3
2 4
three
2 4 1
3 1 3 2
2 2 3
```
###Output example:
The corresponding output is given here. For example:
```out
Not a Clique
Yes
Not Maximal
```







answer:If there is no answer, please comment