标签:class 输出 size str href ems using strong bsp
1 #include <bits/stdc++.h> 2 using namespace std; 3 const int Maxn = 1000007; 4 int a[Maxn]; 5 int main() 6 { 7 int m,n; 8 while(~scanf("%d%d",&n,&m)){ 9 memset(a,0,sizeof(a)); 10 for(int i = 0; i < n; i++){ 11 int t; 12 scanf("%d",&t); 13 a[t+500000] = 1; 14 } 15 for(int i = Maxn; m > 0 ;i--){ 16 if(a[i]){ 17 if(m>1) printf("%d ",i-500000); 18 else printf("%d\n",i-500000); 19 m--; 20 } 21 } 22 } 23 return 0; 24 }
标签:class 输出 size str href ems using strong bsp
原文地址:https://www.cnblogs.com/Edviv/p/11509834.html