codeforces 589I(水题)
来源:互联网 发布:联通小米3支持4g网络吗 编辑:程序博客网 时间:2024/05/16 20:27
题目链接:http://codeforces.com/problemset/problem/589/I
#include<cstdio>#include<cstring>#include<algorithm>#include<iostream>#include<map>#include<vector>#include<cmath>#include<set>using namespace std;typedef long long ll;const int maxn = 30000 + 5;const double eps = 0.00000000000001;int vis[110];int main(){ int n,k; while(~scanf("%d%d",&n,&k)) { memset(vis, 0, sizeof(vis)); int num = n / k; int t; int sum = 0; for(int i = 0; i < n; i++) { scanf("%d",&t); vis[t]++; if(vis[t] > num) sum++; } printf("%d\n",sum); } return 0;}
0 0
- codeforces 589I(水题)
- CodeForces 589I Lottery
- CodeForces 589 I Lottery
- CodeForces Gym 100735I
- Codeforces 120I
- CodeForces 883I
- Codeforces 469A I Wanna Be the Guy(水题)
- Codeforces Gym 100341I Hungry Queen 2 Set水题
- CodeForces 630I(规律题)
- codeforces 630I Parking Lot
- Codeforces 44I Toys (构造)
- Codeforces 630I Parking Lot
- codeforces #630 I. Parking Lot
- codeforces 730I (费用流)
- codeforces Gym 101097 I Sticks
- codeforces 802I 后缀自动机
- Codeforces Gym 101164I Cubes
- Codeforces Gym 100623I Problem I. Important Wires
- 四面体内接圆_______tetrahedron( hdu 5733 2016多校第一场 )
- 洛谷 P1016 [NOIP1999 T2] 旅行家的预算
- 泛型
- HDU 4815
- 今天开始坚持写下去
- codeforces 589I(水题)
- C++内存管理:new的实现以及模拟set_new_handler机制
- 数据结构实验之查找四:二分查找 (sdut oj 3376)
- 一个封装得比较好的上传文件代码
- Mongodb学习使用手册
- 洛谷1967 火车运输
- 你上班价值的在哪里?
- windows Socket编程之重叠IO模型
- Constexpr and Constant Expressions