{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eConsider a graph \u003cb\u003e G \u003c/b\u003e formed from a large number of nodes connected by edges.\nG is said to be connected \u003cb\u003e if a path can be found in 0 or more steps between any\npair of nodes in G\u003c/b\u003e. For example, the graph below is not connected because\nthere is no path from A to C.\u003cbr/\u003e\u003cimg src\u003d\"https://i.imgur.com/lHLxkqe.png\" /\u003e\u003c/p\u003e\n\n\u003cp\u003eThis graph contains, however, a number of subgraphs that are connected,\none for each of the following sets of nodes: {A}, {B}, {C}, {D}, {E}, {A,B},\n{B,D}, {C,E}, {A,B,D}\u003c/p\u003e \n\n\u003cp\u003eA connected subgraph is\u003cb\u003e maximal if there are no nodes and edges in the\noriginal graph that could be added to the subgraph and still leave it connected.\u003c/b\u003e\nThere are two maximal connected subgraphs above, one associated with the\nnodes {A, B, D} and the other with the nodes {C, E}.\u003c/p\u003e\u003cp\u003e\u003cb\u003e\nWrite a program to determine the number of maximal connected subgraphs of a given graph.\u003c/b\u003e\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input begins with a single positive integer on a line by itself indicating the number of the cases\nfollowing, each of them as described below. This line is followed by a blank line, and there is also a\nblank line between two consecutive inputs.\u003c/p\u003e\n\u003cp\u003eThe first line of each input set contains a single uppercase alphabetic character. \u003cb\u003eThis character\nrepresents the largest node name in the graph.\u003c/b\u003e Each successive line contains a pair of uppercase\nalphabetic characters denoting an edge in the graph.\u003c/p\u003e\u003cp\u003eThe sample input section contains a possible input set for the graph pictured above.\nInput is terminated by a blank line.\n\u003c/p\u003e\n\u003cp\u003e\u003cb\u003eInput is terminated by a blank line.\u003c/b\u003e\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\u003cb\u003eFor each test case, write in the output the number of days to visit all the island of country X. The outputs of two consecutive cases will be separated by a blank line.\u003c/b\u003e\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\nE\nAB\nCE\nDB\nEC\n\nG\nAB\nCE\nDB\nEC\nEF\nGG\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\n3\u003c/pre\u003e\n\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n"}},{"title":"Take Care","value":{"format":"HTML","content":"\u003cp\u003e\u003cb\u003eNOTE: \u003c/b\u003e\u003ci\u003eBlank Line After Each Testcase\u003c/i\u003e\u003c/p\u003e"}}]}