#Lutece0314. 新手训练01_树的判定

新手训练01_树的判定

Migrated from Lutece 314 新手训练01_树的判定

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

判断给定的无向图是不是一棵树。

Input

第一行输入22个数nn, mm,表示图有nn个节点(编号00n1n-1),mm条边。

接下来mm行描述mm条边,每行22个数aa, bb,表示aa节点和bb节点之间有一条边相连。

1n1051\leq n\leq 10^5, 0m1050\leq m\leq 10^5, 0a,bn10\leq a,b\leq n-1

Output

true,表示给定的图是一棵树,否则输出false

Samples

输入数据 1

2 1
0 1

输出数据 1

true

Resources

qbwj