{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"给了一个连通图。\n \n问加入边的过程中,桥的个数。"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cdiv\u003e\n \u003cp\u003eThe input consists of multiple test cases. Each test case starts with a line containing two integers \u003ci\u003eN\u003c/i\u003e(1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 100,000) and \u003ci\u003eM\u003c/i\u003e(\u003ci\u003eN\u003c/i\u003e - 1 ≤ \u003ci\u003eM\u003c/i\u003e ≤ 200,000).\u003cbr\u003eEach of the following M lines contains two integers \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e ( 1≤ \u003ci\u003eA\u003c/i\u003e ≠ \u003ci\u003eB\u003c/i\u003e ≤ N), which indicates a link between computer \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e. Computers are numbered from 1 to \u003ci\u003eN\u003c/i\u003e. It is guaranteed that any two computers are connected in the initial network.\u003cbr\u003eThe next line contains a single integer \u003ci\u003eQ\u003c/i\u003e ( 1 ≤ \u003ci\u003eQ\u003c/i\u003e ≤ 1,000), which is the number of new links the administrator plans to add to the network one by one.\u003cbr\u003eThe \u003ci\u003ei\u003c/i\u003e-th line of the following \u003ci\u003eQ\u003c/i\u003e lines contains two integer \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e (1 ≤ \u003ci\u003eA\u003c/i\u003e ≠ \u003ci\u003eB\u003c/i\u003e ≤ \u003ci\u003eN\u003c/i\u003e), which is the \u003ci\u003ei\u003c/i\u003e-th added new link connecting computer \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e.\u003cbr\u003e\u003cbr\u003eThe last test case is followed by a line containing two zeros.\u003cbr\u003e\u003c/p\u003e\n \u003c/div\u003e\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cdiv\u003e\n \u003cp\u003eFor each test case, print a line containing the test case number( beginning with 1) and \u003ci\u003eQ\u003c/i\u003e lines, the \u003ci\u003ei\u003c/i\u003e-th of which contains a integer indicating the number of bridges in the network after the first \u003ci\u003ei\u003c/i\u003e new links are added. Print a blank line after the output for each test case.\u003c/p\u003e\n \u003c/div\u003e\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e3 2\n1 2\n2 3\n2\n1 2\n1 3\n4 4\n1 2\n2 1\n2 3\n1 4\n2\n1 2\n3 4\n0 0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003eCase 1:\n1\n0\n\nCase 2:\n2\n0\u003c/pre\u003e"}}]}