{"trustable":false,"sections":[{"title":"ι’ι’","value":{"format":"HTML","content":"In The City of Eternal Festivities, there are π street junctions and $πβ1$ bidirectional streets,\neach street connecting two of the junctions. Between every two junctions, there is exactly one\n(direct or indirect) path connecting them. No junction is an endpoint for more than 10 streets.\u003cbr\u003e\u003cbr\u003e\nEvery 13th of September (the 256th day of the year), there are many festivities going on in\nThe City. In particular, the citizens want to organize $π$ parades. The parade number $π$ starts at junction $π’π$ and ends at $π£π$, following the unique path between the endpoints. \u003cbr\u003e\u003cbr\u003e\nAs the mayor of The City, you are responsible for citizensβ safety. Therefore you decreed that\nno two parades are ever allowed to use the same street, though they can have common junctions, or even common endpoints. \u003cbr\u003e\u003cbr\u003e\nTo appease your citizens, try to organize as many parades as possible, without breaking the\nsafety regulations."}},{"title":"θΎε ₯","value":{"format":"HTML","content":"The first line of input contains the number of test cases π. The descriptions of the test cases\nfollow:\nThe first line of each test case contains a single integer: the number of junctions $π (2 \\leq π \\leq 1000)$. Each of the next $π β 1$ lines contains two integers $π, π (1 \\leq π \\not\u003d π \\leq π)$, denoting that junctions π and π are connected by a street. Each junction has at most 10 streets leaving it.\n\u003cbr\u003e\u003cbr\u003e\nThe next line contains a single integer: the number of planned parades $π(0 \\leq π \\leq n*(n-1)/2)$. Each of the next π lines contains two integers $π’π, π£π (1 \\leq π’π \\not\u003d π£π \\leq π)$, meaning that a parade is planned to start at junction $π’π$ and finish at junction $π£π$. No two parades share both endpoints.\n"}},{"title":"θΎεΊ","value":{"format":"HTML","content":"For each test case, output one line containing the largest number of parades that can be\norganized with no street used by more than one parade.\n"}},{"title":"ζ ·δΎ","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e1\n6\n1 2\n2 3\n3 4\n3 5\n3 6\n4\n1 3\n4 5\n5 6\n6 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}