BUGLIFE - A Bug’s Life

题意翻译

## 题目大意: 就是一个奇怪的ke学家,他专门研究虫子是否存在同性恋。。。 他为没一只虫子都标上了序号。 通过这个奇怪的ke学家的研究,找出了在这些虫子中的所有关系的虫子,**题目询问在这么多有关系的虫子中是否存在**“同性恋”。 ## 输入: 第一行, 输入一个数,表示有$t$组数据 对于每组数据,第一行输入$n,m$,表示有$n$只虫子,有$m$个关系 接下来行每行两个数$x,y$,表示$x,y$有关系 ## 输出 对于每一组数据: 先输出:"Scenario #i" ,表示第$i$组数据 然后如果有同性恋的输出"Suspicious bugs found!" 否则输出"No suspicious bugs found!"

题目描述

Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gender. In his experiment, individual bugs and their interactions were easy to identify, because numbers were printed on their backs. Given a list of bug interactions, decide whether the experiment supports his assumption of two genders with no homosexual bugs or if it contains some bug interactions that falsify it.

输入输出格式

输入格式


The first line of the input contains the number of scenarios. Each scenario starts with one line giving the number of bugs (at least one, and up to 2000) and the number of interactions (up to 1000000) separated by a single space. In the following lines, each interaction is given in the form of two distinct bug numbers separated by a single space. Bugs are numbered consecutively starting from one.

输出格式


The output for every scenario is a line containing “Scenario #i:”, where i is the number of the scenario starting at 1, followed by one line saying either “No suspicious bugs found!” if the experiment is consistent with his assumption about the bugs’ sexual behavior, or “Suspicious bugs found!” if Professor Hopper’s assumption is definitely wrong.

输入输出样例

输入样例 #1

2
3 3
1 2
2 3
1 3
4 2
1 2
3 4

输出样例 #1

Scenario #1:
Suspicious bugs found!
Scenario #2:
No suspicious bugs found!