{"problem":{"name":"C. Nate and Contest Invitation","description":{"content":"Nate wants to have more people join his contest. However, he doesn't have much time. He can only directly send invitations to $k$ people. Thankfully, if he invites someone, that person can tell all of","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10205C"},"statements":[{"statement_type":"Markdown","content":"Nate wants to have more people join his contest. However, he doesn't have much time. He can only directly send invitations to $k$ people. Thankfully, if he invites someone, that person can tell all of his friends about the contest, and those friends can tell all of their friends, and so on.\n\nSuppose that there are $n$ people and $m$ pairs of them are friends. What is the maximum number of people he can invite?\n\nThe first line of input contains three space-separated integers $n$, $m$, and $k$, respectively. The first integer, $n$, is the number of people. The second integer, $m$, is the number of pairs of friends. The third integer, $k$, is the number of invitations Nate can directly send.\n\nThe next $m$ lines of input each contain two space-separated strings, the names of a pair of friends. Each name is composed of only lowercase English letters and doesn't exceed 10 letters in length.\n\n*Constraints*\n\n$1 <= n <= 10^5$\n\n $1 <= m <= 10^5$\n\n $1 <= k <= min (n, 100)$\n\nOutput a single integer, the maximum number of people Nate can invite.\n\nIn the first test case, Nate can invite Anne, who invites both her friends Billy and Charles.\n\nIn the second test case, Nate can invite Dave, who invites Earl, who invites Fontana. There is no way to invite all six people, as none of Dave, Earl, and Fontana are friends with Gillian, Heather, or Ian.\n\nIn the third test case, Nate can invite Joshua, Lily, and Ned, who then invite Karla, Mark, and Oliver respectively.\n\n## Input\n\nThe first line of input contains three space-separated integers $n$, $m$, and $k$, respectively. The first integer, $n$, is the number of people. The second integer, $m$, is the number of pairs of friends. The third integer, $k$, is the number of invitations Nate can directly send.The next $m$ lines of input each contain two space-separated strings, the names of a pair of friends. Each name is composed of only lowercase English letters and doesn't exceed 10 letters in length.*Constraints*$1 <= n <= 10^5$ $1 <= m <= 10^5$ $1 <= k <= min (n, 100)$\n\n## Output\n\nOutput a single integer, the maximum number of people Nate can invite.\n\n[samples]\n\n## Note\n\nIn the first test case, Nate can invite Anne, who invites both her friends Billy and Charles.In the second test case, Nate can invite Dave, who invites Earl, who invites Fontana. There is no way to invite all six people, as none of Dave, Earl, and Fontana are friends with Gillian, Heather, or Ian.In the third test case, Nate can invite Joshua, Lily, and Ned, who then invite Karla, Mark, and Oliver respectively.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s = (|\\mu(1)|, |\\mu(2)|, |\\mu(3)|, \\dots, |\\mu(10^9)|) $ be an infinite sequence where $ \\mu(n) $ is the Möbius function:  \n$$\n\\mu(n) = \n\\begin{cases} \n0 & \\text{if } n \\text{ has a squared prime factor}, \\\\\n(-1)^k & \\text{if } n \\text{ is the product of } k \\text{ distinct primes}, \\\\\n1 & \\text{if } n = 1.\n\\end{cases}\n$$  \nLet $ t \\in \\{0,1\\}^{200} $ be the given binary string formed by concatenating 10 lines of 20 characters each.\n\n**Constraints**  \n- $ t $ is a binary string of length 200.\n- $ s $ is defined for all $ x \\in \\{1, 2, \\dots, 10^9\\} $.\n- We seek the minimal $ p \\in \\mathbb{Z}^+ $ such that $ |\\mu(p+i)| = t_{i+1} $ for all $ i \\in \\{0, 1, \\dots, 199\\} $.\n\n**Objective**  \nFind the smallest positive integer $ p $ such that  \n$$\n\\forall i \\in \\{0, 1, \\dots, 199\\}, \\quad |\\mu(p + i)| = t[i]\n$$  \nIf no such $ p \\leq 10^9 - 199 $ exists, output $ -1 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10205C","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}