题解 | #明明的随机数#
明明的随机数
http://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
#include<stdio.h>
int main(){
int N = -1;
int b = -1;
while(scanf("%d",&N)!=EOF){
int count[1000]={0};
for(int i = 0;i<N;i++){
scanf("%d",&b);
count[b]=1;
//用桶排序的思想
}
for(int i = 0;i<1000;i++){
if(count[i]==1){
printf("%d\n",i);
}
}
}
}