九度 1431
来源:互联网 发布:mysql 删除重复的数据 编辑:程序博客网 时间:2024/05/29 12:39
代码
#include <iostream>#include <cstdio>using namespace std;#define OFFSET 500000int main(){int n,m,i,t;while(scanf("%d%d",&n,&m)!=EOF){int Hash[1000001];for(i=0;i<1000001;i++){Hash[i]=0;}for(i=0;i<n;i++){cin>>t;Hash[t+OFFSET]++;}for(i=1000000;i>=0;i--){if(Hash[i]){cout<<i-500000;m--;if(m!=0){ cout<<" ";}else{ cout<<endl; break;}}}}return 0;}
阅读全文
0 0
- 九度oj 1431
- 九度题目1431
- 九度 1431
- 九度题目1431:Sort
- 九度 题目1431:Sort
- 九度题目1431解
- 九度oj-1431-Sort
- 九度题目1431:Sort
- 【九度】题目1431:Sort
- 九度OJ-1431:Sort
- 九度-简单题 题目1431:Sort
- 九度oj-1431:sort.hash应用
- 【九度OJ】:九度OJ 1050
- 【九度OJ】:九度OJ 1053
- 【九度OJ】:九度OJ 1056
- 【九度OJ】:九度OJ 1059
- 【九度OJ】:九度OJ 1206
- 人生九度
- HTML 表格
- Android ViewFilgger+GestrueDetector用手势实现滑动
- 删除链表中的重复元素
- 【总结】理解KMP算法思想
- 《机器学习》阅读心得--二、模型评估与选择
- 九度 1431
- 莫比乌斯反演与杜教筛
- 下拉列表的使用
- matplotlib(学习二)
- Android手势(Gesture)
- 网页界面组件 ControlKit
- js拼接URL字符串
- 印象笔记不能同步(其他浏览器可以上网,IE不能上网)
- Android获取触摸手势实现左右滑动