{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n 从前有一个城市,它有n个路口,同时有一些道路连接着这些路口。现在需要安排一些伞兵降落在特定的路口上清查所有路口。一个伞兵可以沿着一条路清理过去,清查过程中不能有两个伞兵同时清查一个路口。给了城市的地图,求最少需要几个伞兵才能够清理所有路口。\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Your program should read sets of data. The first line of the input file contains the number of the data sets. Each data set specifies the structure of a town and has the format: \n\u003cbr\u003e \n\u003cbr\u003eno_of_intersections \n\u003cbr\u003eno_of_streets \n\u003cbr\u003eS1 E1 \n\u003cbr\u003eS2 E2 \n\u003cbr\u003e...... \n\u003cbr\u003eSno_of_streets Eno_of_streets \n\u003cbr\u003e \n\u003cbr\u003eThe first line of each data set contains a positive integer no_of_intersections (greater than 0 and less or equal to 120), which is the number of intersections in the town. The second line contains a positive integer no_of_streets, which is the number of streets in the town. The next no_of_streets lines, one for each street in the town, are randomly ordered and represent the town\u0027s streets. The line corresponding to street k (k \u0026lt;\u003d no_of_streets) consists of two positive integers, separated by one blank: Sk (1 \u0026lt;\u003d Sk \u0026lt;\u003d no_of_intersections) - the number of the intersection that is the start of the street, and Ek (1 \u0026lt;\u003d Ek \u0026lt;\u003d no_of_intersections) - the number of the intersection that is the end of the street. Intersections are represented by integers from 1 to no_of_intersections. \n\u003cbr\u003e \n\u003cbr\u003eThere are no blank lines between consecutive sets of data. Input data are correct. \n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"The result of the program is on standard output. For each input data set the program prints on a single line, starting from the beginning of the line, one integer: the minimum number of paratroopers required to visit all the intersections in the town. \n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n4\n3\n3 4\n1 3\n2 3\n3\n3\n1 3\n1 2\n2 3\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e2\n1\u003c/pre\u003e"}}]}