{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"给一个无向连通图,至少添加几条边使得去掉图中任意一条边不改变图的连通性(即使得它变为边双连通图)。"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cp\u003eThe first line of input will consist of positive integers \u003ci\u003en\u003c/i\u003e and \u003ci\u003er\u003c/i\u003e, separated by a space, where 3 ≤ \u003ci\u003en\u003c/i\u003e ≤ 1000 is the number of tourist attractions on the island, and 2 ≤ \u003ci\u003er\u003c/i\u003e ≤ 1000 is the number of roads. The tourist attractions are conveniently labelled from 1 to \u003ci\u003en\u003c/i\u003e. Each of the following \u003ci\u003er\u003c/i\u003e lines will consist of two integers, \u003ci\u003ev\u003c/i\u003e and \u003ci\u003ew\u003c/i\u003e, separated by a space, indicating that a road exists between the attractions labelled \u003ci\u003ev\u003c/i\u003e and \u003ci\u003ew\u003c/i\u003e. Note that you may travel in either direction down each road, and any pair of tourist attractions will have at most one road directly between them. Also, you are assured that in the current configuration, it is possible to travel between any two tourist attractions.\u003c/p\u003e\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cp\u003eOne line, consisting of an integer, which gives the minimum number of roads that we need to add.\u003c/p\u003e\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003eSample Input 1\n10 12\n1 2\n1 3\n1 4\n2 5\n2 6\n5 6\n3 7\n3 8\n7 8\n4 9\n4 10\n9 10\n\nSample Input 2\n3 3\n1 2\n2 3\n1 3\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003eOutput for Sample Input 1\n2\n\nOutput for Sample Input 2\n0\n\u003c/pre\u003e"}}]}