304397: CF841A. Generous Kefa
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Generous Kefa
题意翻译
## 题目描述: 读入一个字符串(都是小写字母),让你求出里边最多的一种字母的个数是否小于等于 $k$。,若大于输出"NO",否则输出"YES"。 ## 输入输出格式 ### 输入格式: 第一行为两个正整数$n$和$k$ ( 1 $\le$ $n$ , $k$ $\le$ 100 ) , $n$表示字符串的长度 , $k$如题目描述所讲。 第二行为一个字符串。 ### 输出格式: 一行,YES 或 NO , 如题目描述所讲。题目描述
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.输入输出格式
输入格式
The first line contains two integers $ n $ and $ k $ ( $ 1<=n,k<=100 $ ) — the number of baloons and friends. Next line contains string $ s $ — colors of baloons.
输出格式
Answer to the task — «YES» or «NO» in a single line. You can choose the case (lower or upper) for each letter arbitrary.
输入输出样例
输入样例 #1
4 2
aabb
输出样例 #1
YES
输入样例 #2
6 3
aacaab
输出样例 #2
NO