|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||3||2||2||66.667%|
Administrator Selfridge is analyzing possible mining routes on Pandora. He has collected some data in the form of a graph. Your goal is to help him collect some information about each graph.
Connections between mines are described beginning with the line ”GRAPH BEGIN”. Additional lines lists individual mines (nodes), followed (on the same line) by their neighboring mines (edges). The line ”GRAPH END” ends the list of path descriptions. The entire problem may be repeated as desired, starting from scratch each time. Some mines may appear only as neighboring mines, without being described on a separate line.
Your output should consist one line (for each graph analyzed), consisting of ”NODES” followed by the number of nodes, followed by ”EDGES” and the number of edges in the graph.
GRAPH BEGIN a b b c GRAPH END GRAPH BEGIN a b c b c d d e f e f GRAPH END
NODES 3 EDGES 2 NODES 6 EDGES 7