正在加载图片...
We have a network of computers and a list of bi-directional connections Each of these connections allows a file transfer from one computer to another. Is it possible to send a file from any computer on the network to any other? Input: Input consists of several test cases. For each test case, the first line contains n(<=10, 000), the total number of computers in a network Each computer in the network is then represented by a positive integer between l and N Then in the following lines the input is given in the format: I c1 c2 where I stands for inputting a connection between cl and c2: or c cl c2 where c stands for checking if it is possible to transfer files between cl and c2: or where s stands for stopping this case.We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it possible to send a file from any computer on the network to any other? Input: Input consists of several test cases. For each test case, the first line contains N (<=10,000), the total number of computers in a network. Each computer in the network is then represented by a positive integer between 1 and N. Then in the following lines, the input is given in the format: I c1 c2 where I stands for inputting a connection between c1 and c2; or C c1 c2 where C stands for checking if it is possible to transfer files between c1 and c2; or S where S stands for stopping this case
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有