hdu 5210 Delete
来源:互联网 发布:什么是网络存储 编辑:程序博客网 时间:2024/06/03 11:09
WLD likes playing with numbers. One day he is playing with NN integers. He wants to delete KK integers from them. He likes diversity, so he wants to keep the kinds of different integers as many as possible after the deletion. But he is busy pushing, can you help him?
Input
There are Multiple Cases. (At MOST 100100)
For each case:
The first line contains one integer N(0
#include<stdio.h>#include<algorithm>using namespace std;int main(){ int n; while(~scanf("%d",&n)) { int a[10003]; for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); int ans=0; for(int i=0;i<n-1;i++) if(a[i]==a[i+1])ans++; int k=0; scanf("%d",&k); int sum=n-ans; k-=ans; if(k>0) sum-=k; else sum=sum; printf("%d\n",sum); }}
0 0
- hdu 5210 Delete
- HDU-5210-Delete(Oier)
- HDU 5210 Delete
- hdu 5210 Delete
- HDU 5210 DELETE
- HDU 5210 Delete
- HDU 5210 Delete
- hdu 5210 Delete
- hdu 5210 Delete(set)
- HDU ACM 5210 Delete 水题
- Hdoj 5210 Delete 【水】
- hdoj 5210 Delete 【水题】
- DELETE
- delete
- delete
- DELETE
- delete
- delete
- 微信小程序输入框大全
- 九数组分数
- 2017寒假练习赛总结(实时更新)
- Spark深入第一步DAGScheduler
- 深度搜索【基本解题方法】【总结】
- hdu 5210 Delete
- windows sftp客户端与树莓之间通过ssh互传文件
- 欢迎使用CSDN-markdown编辑器
- C语言-----开发工具的使用shell
- 7.5.5
- 从Android studio开始--使用技巧
- CSS3--弹性盒子(Flex Box)
- mybatis批量插入数据
- [matlab]regress回归分析中F统计量的计算