{"problem":{"name":"Friends","description":{"content":"There are $N$ persons called Person $1$ through Person $N$. You are given $M$ facts that \"Person $A_i$ and Person $B_i$ are friends.\" The same fact may be given multiple times. If $X$ and $Y$ are frie","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc177_d"},"statements":[{"statement_type":"Markdown","content":"There are $N$ persons called Person $1$ through Person $N$.\nYou are given $M$ facts that \"Person $A_i$ and Person $B_i$ are friends.\" The same fact may be given multiple times.\nIf $X$ and $Y$ are friends, and $Y$ and $Z$ are friends, then $X$ and $Z$ are also friends. There is no friendship that cannot be derived from the $M$ given facts.\nTakahashi the evil wants to divide the $N$ persons into some number of groups so that every person has no friend in his/her group.\nAt least how many groups does he need to make?\n\n## Constraints\n\n*   $2 \\leq N \\leq 2\\times 10^5$\n*   $0 \\leq M \\leq 2\\times 10^5$\n*   $1\\leq A_i,B_i\\leq N$\n*   $A_i \\neq B_i$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $B_1$\n$\\vdots$\n$A_M$ $B_M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc177_d","tags":[],"sample_group":[["5 3\n1 2\n3 4\n5 1","3\n\nDividing them into three groups such as ${1,3}$, ${2,4}$, and ${5}$ achieves the goal."],["4 10\n1 2\n2 1\n1 2\n2 1\n1 2\n1 3\n1 4\n2 3\n2 4\n3 4","4"],["10 4\n3 1\n4 1\n5 9\n2 6","3"]],"created_at":"2026-03-03 11:01:14"}}