1451: Semiconnected
时间限制: 1 Sec 内存限制: 32 MB提交: 79 解决: 20
题目描述
For a directed graph G = (V, E), if for all pairs of nodes u,v, u can always reach v or v can always reach u , then we call this a Semiconnected graph. Now you are given a directed graph, you should tell us whether it is a Semiconnected graph. If it is, output “yes”, or else“no”.
输入
There are several test cases, for each test case, there are two integers in the first line, n and