codeforces 841A Generous Kefa
来源:互联网 发布:网络直播摄像头哪种好 编辑:程序博客网 时间:2024/05/18 01:09
点击打开链接
水题。因为给朋友气球不能重的,所以直接看相同颜色气球的最大数量,如果不大于k就YES,否则就NO
#include<cstdio>#include<cstring>#include<map>using namespace std;int main(){ map<char,int>ff; int n,k,i; char str[110],x; scanf("%d%d",&n,&k); scanf("%s",str); for(i=0; i<n; i++) { x=str[i]; ff[x]++; if(ff[x]>k) { printf("NO\n"); return 0; } } printf("YES\n"); return 0;}
阅读全文
0 0
- codeforces 841A Generous Kefa
- codeforces 841A Generous Kefa
- Codeforces 429 A. Generous Kefa
- Codeforces Round #429 (Div. 2) 841A Generous Kefa(水)
- Codeforces-429-2-A Generous Kefa
- Codeforces 841 Generous Kefa(模拟)
- Generous Kefa CodeForces
- 429A. Generous Kefa
- A. Generous Kefa
- Codeforces Round #429 (Div. 2):A. Generous Kefa
- Codeforces Round #429 (Div. 2) | A. Generous Kefa
- Generous Kefa
- A. Generous Kefa(Round #429 (Div. 2))
- CF Generous Kefa(水)
- CodeForces 580A Kefa and First Steps
- Codeforces 580A Kefa and First Steps
- Codeforces-580A-Kefa and First Steps
- CodeForces 580A Kefa and First Steps
- Thymeleaf怎么原样输出html内容
- toolbar字体大小修改
- c++中箭头和点的区别
- Linux定时任务的设置
- Viewpager和GridView
- codeforces 841A Generous Kefa
- Error: Unknown system variable 'language'
- QQ强行聊天(不用加好友)
- ASCH-CLI 说明文档
- Android7.0 添加自定义SystemService
- 转:企业SaaS这桩to B的生意,金蝶正用to C的方式引发“蝴蝶效应”
- 软件测试一
- 我是如何理解Java抽象类和接口的
- js数组去重复的最优写法