|Online Judge||Problem Set||Authors||Online Contests||User|
After recapturing Sylla, the Company plans to establish a new secure system, a transferring net! The new system is designed as follows:
The Company staff choose N cities around the nation which are connected by "security tunnels" directly or indirectly. Once a week, Sylla is to be transferred to another city through the tunnels. As General ordered, the transferring net must reach a certain security level that there are at least 3 independent paths between any pair of cities a, b. When General says the paths are independent, he means that the paths share only a and b in common.
Given a design of a transferring net, your work is to inspect whether it reaches such security level.
The input consists of several test cases.
The input ends by two zeroes.
For each test case output "YES" if it reaches such security level, "NO" otherwise.
4 6 0 1 0 2 0 3 1 2 1 3 2 3 4 5 0 1 0 2 0 3 1 2 1 3 7 6 0 1 0 2 0 3 1 2 1 3 2 3 0 0
YES NO NO
[Submit] [Go Back] [Status] [Discuss]
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator