{"problem":{"name":"A. Generous Kefa","description":{"content":"One day Kefa found _n_ baloons. For convenience, we denote color of _i_\\-th baloon as _s__i_ — lowercase letter of the Latin alphabet. Also Kefa has _k_ friends. Friend will be upset, If he get two ba","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF841A"},"statements":[{"statement_type":"Markdown","content":"One day Kefa found _n_ baloons. For convenience, we denote color of _i_\\-th baloon as _s__i_ — lowercase letter of the Latin alphabet. Also Kefa has _k_ friends. Friend will be upset, If he get two baloons of the same color. Kefa want to give out **all** baloons to his friends. Help Kefa to find out, can he give out all his baloons, such that no one of his friens will be upset — print «_YES_», if he can, and «_NO_», otherwise. Note, that Kefa's friend will not upset, if he doesn't get baloons at all.\n\n## Input\n\nThe first line contains two integers _n_ and _k_ (1 ≤ _n_, _k_ ≤ 100) — the number of baloons and friends.\n\nNext line contains string _s_ — colors of baloons.\n\n## Output\n\nAnswer to the task — «_YES_» or «_NO_» in a single line.\n\nYou can choose the case (lower or upper) for each letter arbitrary.\n\n[samples]\n\n## Note\n\nIn the first sample Kefa can give 1\\-st and 3\\-rd baloon to the first friend, and 2\\-nd and 4\\-th to the second.\n\nIn the second sample Kefa needs to give to all his friends baloons of color _a_, but one baloon will stay, thats why answer is «_NO_».","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"一天，Kefa 找到了 #cf_span[n] 个气球。为方便起见，我们记第 #cf_span[i] 个气球的颜色为 #cf_span[si] —— 拉丁字母的小写字母。同时，Kefa 有 #cf_span[k] 个朋友。如果一个朋友收到两个颜色相同的气球，他会不高兴。Kefa 希望将 *所有* 气球分发给他的朋友们。请帮助 Kefa 判断，他是否能将所有气球分发出去，使得没有任何朋友不高兴——如果可以，请输出 «_YES_»，否则输出 «_NO_»。注意，如果一个朋友没有收到任何气球，他不会不高兴。\n\n第一行包含两个整数 #cf_span[n] 和 #cf_span[k] (#cf_span[1 ≤ n, k ≤ 100]) —— 气球和朋友的数量。\n\n第二行包含字符串 #cf_span[s] —— 气球的颜色。\n\n输出该问题的答案 —— 单行输出 «_YES_» 或 «_NO_»。\n\n你可以任意选择每个字母的大小写。\n\n在第一个样例中，Kefa 可以将第 #cf_span[1] 个和第 #cf_span[3] 个气球给第一个朋友，将第 #cf_span[2] 个和第 #cf_span[4] 个气球给第二个朋友。\n\n在第二个样例中，Kefa 需要将所有颜色为 _a_ 的气球分给他的朋友们，但会剩下一个气球，因此答案是 «_NO_»。\n\n## Input\n\n第一行包含两个整数 #cf_span[n] 和 #cf_span[k] (#cf_span[1 ≤ n, k ≤ 100]) —— 气球和朋友的数量。第二行包含字符串 #cf_span[s] —— 气球的颜色。\n\n## Output\n\n输出该问题的答案 —— 单行输出 «_YES_» 或 «_NO_»。你可以任意选择每个字母的大小写。\n\n[samples]\n\n## Note\n\n在第一个样例中，Kefa 可以将第 #cf_span[1] 个和第 #cf_span[3] 个气球给第一个朋友，将第 #cf_span[2] 个和第 #cf_span[4] 个气球给第二个朋友。在第二个样例中，Kefa 需要将所有颜色为 _a_ 的气球分给他的朋友们，但会剩下一个气球，因此答案是 «_NO_»。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n, k \\in \\mathbb{Z} $ be the number of balloons and friends, respectively.  \nLet $ s \\in \\Sigma^n $ be a string of length $ n $ over the alphabet $ \\Sigma $ of lowercase Latin letters, where $ s_i $ denotes the color of the $ i $-th balloon.  \nLet $ c: \\Sigma \\to \\mathbb{Z}_{\\geq 0} $ be the frequency function, where $ c(\\chi) $ is the number of balloons of color $ \\chi $.\n\n**Constraints**  \n1. $ 1 \\leq n, k \\leq 100 $  \n2. $ s_i \\in \\{a, b, \\dots, z\\} $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nDetermine whether it is possible to assign all $ n $ balloons to $ k $ friends such that no friend receives two balloons of the same color.  \n\nThis is possible if and only if:  \n$$\n\\max_{\\chi \\in \\Sigma} c(\\chi) \\leq k\n$$\n\nOutput \"YES\" if the condition holds, otherwise \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF841A","tags":["brute force","implementation"],"sample_group":[["4 2\naabb","YES"],["6 3\naacaab","NO"]],"created_at":"2026-03-03 11:00:39"}}