离散题目13
Time Limit: 1000MS Memory Limit: 65536KB
Submit Statistic
Problem Description
DaYu平时只顾着看电影,没有学习离散,学期末快考试的时候才慌了神,因为时间不够,因此他决定只复习一个知识点,但是他发现他一个知识点都不会,因此他跑过来请你帮他解决一个问题。求一个集合是否是自反的。
Input
第一行输入组数T(T<10),每组的第一行输入集合元素个数m(m < 100)和对应关系个数n(n < 100),集合中元素为1,2,…,m,接下来n行每行输入两个数x,y(0 < x, y < 100)
Output
如果满足自反关系,则输出true,否则输出false。
Example Input
2
5 9
1 1
1 2
2 2
3 3
2 3
4 4
4 5
5 5
5 1
5 8
1 1
1 2
2 2
3 3
2 3
4 4
4 5
5 1
Example Output
true
false
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int a[1000][1000