{"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\u003e\nSuppose there are \u003cvar\u003eN\u003c/var\u003e people in ZJU, whose ages are unknown. We have some messages about them. The \u003cvar\u003ei\u003c/var\u003e-th message shows that the age of person \u003cvar\u003es\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e is not smaller than the age of person \u003cvar\u003et\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e. \nNow we need to divide all these \u003cvar\u003eN\u003c/var\u003e people into several groups. One\u0027s age shouldn\u0027t be compared with each other in the same group, directly or indirectly. And everyone should be assigned to one and only one group.\nThe task is to calculate the minimum number of groups that meet the requirement.\n\u003c/p\u003e\n\u003cp\u003e\n\n\u003c/p\u003e\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003e\nThere are multiple test cases. For each test case: \nThe first line contains two integers \u003cvar\u003eN\u003c/var\u003e(1≤ \u003cvar\u003eN\u003c/var\u003e≤ 100000), \u003cvar\u003eM\u003c/var\u003e(1≤ \u003cvar\u003eM\u003c/var\u003e≤ 300000), \u003cvar\u003eN\u003c/var\u003e is the number of people, and \u003cvar\u003eM\u003c/var\u003e is is the number of messages. \nThen followed by \u003cvar\u003eM\u003c/var\u003e lines, each line contain two integers s\u003csub\u003ei\u003c/sub\u003e and t\u003csub\u003ei\u003c/sub\u003e.\nThere is a blank line between every two cases.\nProcess to the end of input.\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003e\nFor each the case, print the minimum number of groups that meet the requirement one line.\n\u003c/p\u003e\n\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\u003e4 4\n1 2\n1 3\n2 4\n3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n\u003ch4\u003eHint\u003c/h4\u003e\n\u003cp\u003e\nset1\u003d {1}, set2\u003d {2, 3}, set3\u003d {4}\n\u003c/p\u003e\n\n\n"}}]}