#CF841A. Generous Kefa
Generous Kefa
题目描述
One day Kefa found baloons. For convenience, we denote color of -th baloon as — lowercase letter of the Latin alphabet. Also Kefa has 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 and ( ) — the number of baloons and friends.
Next line contains string — 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.
题目大意
题目描述:
读入一个字符串(都是小写字母),让你求出里边最多的一种字母的个数是否小于等于 。,若大于输出"NO",否则输出"YES"。
输入输出格式
输入格式:
第一行为两个正整数和 ( 1 , 100 ) , 表示字符串的长度 , 如题目描述所讲。
第二行为一个字符串。
输出格式:
一行,YES 或 NO , 如题目描述所讲。
4 2
aabb
YES
6 3
aacaab
NO
提示
In the first sample Kefa can give -st and -rd baloon to the first friend, and -nd and -th to the second.
In 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».