{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAlice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than \u003cvar\u003ek\u003c/var\u003e friends in common, they will become friends in several days. Currently, there are totally \u003cvar\u003en\u003c/var\u003e people in the country, and \u003cvar\u003em\u003c/var\u003e friendship among them. Assume that any new friendship is made only when they have sufficient friends in common mentioned above, you are to tell how many new friendship are made after a sufficiently long time.\u003c/p\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003eThere are multiple test cases.\u003c/p\u003e\n\u003cp\u003eThe first lien of the input contains an integer \u003cvar\u003eT\u003c/var\u003e (about 100) indicating the number of test cases. Then \u003cvar\u003eT\u003c/var\u003e cases follow. For each case, the first line contains three integers \u003cvar\u003en, m, k\u003c/var\u003e (1 ≤ \u003cvar\u003en\u003c/var\u003e ≤ 100, 0 ≤ \u003cvar\u003em\u003c/var\u003e ≤ \u003cvar\u003en×(n-1)/2\u003c/var\u003e, 0 ≤ \u003cvar\u003ek\u003c/var\u003e ≤ \u003cvar\u003en\u003c/var\u003e, there will be no duplicated friendship) followed by \u003cvar\u003em\u003c/var\u003e lines showing the current friendship. The \u003cvar\u003eith\u003c/var\u003e friendship contains two integers \u003cvar\u003eu\u003csub\u003ei\u003c/sub\u003e, v\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e (0 ≤ \u003cvar\u003eu\u003csub\u003ei\u003c/sub\u003e, v\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e \u0026lt; \u003cvar\u003en\u003c/var\u003e, \u003cvar\u003eu\u003csub\u003ei\u003c/sub\u003e ≠ v\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e) indicating there is friendship between person \u003cvar\u003eu\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e and \u003cvar\u003ev\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNote: The edges in test data are generated randomly.\u003c/strong\u003e\u003c/p\u003e\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eFor each case, print one line containing the answer.\u003c/p\u003e\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\u003e3\n4 4 2\n0 1\n0 2\n1 3\n2 3\n5 5 2\n0 1\n1 2\n2 3\n3 4\n4 0\n5 6 2\n0 1\n1 2\n2 3\n3 4\n4 0\n2 0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n0\n4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u003c/p\u003e\n"}}]}