{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"Alex教授将组织学生参加一个学术会议。\n\n亚历克斯有N个优秀的学生,他决定从他们中挑选一些人(可能没有)参加会议。他们组成一个小组。他们中的一些对是朋友。\n\n对于每一对朋友(x,y),如果他们都参加了会议,小组的友好值将增加1,如果他们中只有一个人参加了会议,小组的友好值将减少1。如果有k个学生参加会议,该组的友好值将减少k。\n\n亚历克斯想让这个小组更加友好。请输出该组的最大友好值。"}},{"title":"Input","value":{"format":"HTML","content":"输入的第一行给出了测试案例的数量,$T(1≤T≤10^4)$。接下来是T个测试用例。\n\n对于每个测试用例,第一行包含两个整数$n(1≤n≤3×10^5)$和$m(1≤m≤10^6)$,其中n是学生的数量,m是朋友的夫妇数量。\n\n接下来的m行中的每一行都包含两个整数$x_i,y_i(1≤x_i,y_i≤n,x_i≠y_i)$,代表学生$x_i$和学生$y_i$是朋友。它保证无序对$(x_i,y_i)$是不同的。\n\n所有测试案例中n的总和不超过$10^6$,所有测试案例中m的总和不超过$2×10^6$。"}},{"title":"Output","value":{"format":"HTML","content":"对于每个测试案例,输出一行包含 \"案例#x: y\",其中x是测试案例编号(从1开始),y是该组的最大友好值。"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e2\n4 5\n1 2\n1 3\n1 4\n2 3\n3 4\n2 1\n1 2\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eCase #1: 1\nCase #2: 0\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}}]}