CodeForces 589I Lottery
来源:互联网 发布:台湾绿瓦5.5膛线数据 编辑:程序博客网 时间:2024/05/01 13:21
水题
#include <cstdio>#include <iostream>#include <algorithm>#include <cmath>#include <queue>#include <cstdlib>#include <cstring>#include <vector>#include <set>using namespace std;#define ll long long#define maxn 105int color[maxn];int main(){//freopen("input.txt", "r", stdin);//freopen("output.txt", "w", stdout);int k, n;scanf("%d%d", &n, &k);int t;for (int i = 0; i < n; ++i){scanf("%d", &t);color[t]++;}t = n / k;int ans = 0;for (int i = 1; i <= k; ++i){if (color[i] > t)ans += color[i] - t;}printf("%d\n", ans);//system("pause");//while (1);return 0;}
0 0
- CodeForces 589I Lottery
- CodeForces 589 I Lottery
- I. Lottery
- CodeForces 5891 Lottery
- Lottery
- codeforces 589I(水题)
- 【2015-2016 ACM-ICPC, NEERC, Southern Subregional Contest I】【水题】Lottery 均分气球最小修改数
- On Lottery
- Another lottery
- Welfare Lottery and Sports Lottery
- CodeForces Gym 100735I
- Codeforces 120I
- CodeForces 883I
- CodeForces 630I(规律题)
- codeforces 630I Parking Lot
- Codeforces 44I Toys (构造)
- Codeforces 630I Parking Lot
- codeforces #630 I. Parking Lot
- NOIP 2013 提高组&&队内赛部分题解
- listview分页加载
- Android ORMLite 框架的入门用法
- hdoj--1865 1sting
- Hibernate入门
- CodeForces 589I Lottery
- Handler的三种交互场景
- storm 1.0新功能--Windowing Support in Core Storm滑动窗口
- La4287 Proving Equivalences
- 一个简单天气app完成(总结)
- 数据库分库分表
- UVA10943 How do you add?
- Android 快速开发系列 ORMLite 框架最佳实践
- 内存溢出和内存泄漏