{"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":"\u003cp\u003e给你一个无向图,包含 $$$n$$$ 个顶点和 $$$\\frac{n(n-1)}{2}-m$$$ 条边。与其给出图中存在的边,我们给出 $$$m$$$ 个无序对 $$$(x,y)$$$,使得 $$$x$$$ 和 $$$y$$$ 之间没有边,并且如果某对顶点未在输入中列出,则它们之间有一条边。\u003c/p\u003e\n\n\u003cp\u003e你需要找出图中连通分量的数量,以及每个连通分量的大小。连通分量是指一个顶点集合 $$$X$$$,对于这个集合中的任意两个顶点,图中至少存在一条路径连接这两个顶点,但是将任何其他顶点加入 $$$X$$$ 都会违反这一规则。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e第一行包含两个整数 $$$n,m$$$ ($$$1 \\leq n \\leq 200~000$$$ 且 $$$0 \\leq m \\leq \\min(\\frac{n(n-1)}{2},~200~000)$$$)\u003c/p\u003e\n\n\u003cp\u003e接下来有 $$$m$$$ 行,每行包含一对整数 $$$x,y$$$ ($$$1 \\leq x, y \\leq n$$$ 且 $$$x \\neq y$$$),表示 \u003cspan class\u003d\"tex-font-style-bf\"\u003e没有边\u003c/span\u003e 连接 $$$x$$$ 和 $$$y$$$。每对顶点最多只列出一次;$$$(x,y)$$$ 和 $$$(y,x)$$$ 被视为相同(因此它们永远不会同时出现在同一个测试用例中)。如果某对顶点未在输入中列出,则它们之间 \u003cspan class\u003d\"tex-font-style-bf\"\u003e存在\u003c/span\u003e 一条边。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e首先输出 $$$k$$$,表示图中连通分量的数量。\u003c/p\u003e\u003cp\u003e然后按非递减顺序输出 $$$k$$$ 个整数,表示每个连通分量的大小。\u003c/p\u003e"}},{"title":"示例 1","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\u003e5 5\n1 2\n3 4\n3 2\n4 2\n2 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 4 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}