OJ-Problems-Source/CodeVS/1076_冰封.c

24 lines
405 B
C
Raw Normal View History

2016-07-06 14:28:18 +08:00
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:ǧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Ŀ:p1076 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
#include <stdio.h>
#include <stdlib.h>
int cmp(const void *x, const void *y){
return *(int*)x > *(int*)y;
}
int main(int argc, char* argv[]){
int a[100000], size;
int i, j;
scanf("%i", &size);
for(i = 0; i < size; i++)
scanf("%i", &a[i]);
qsort(a, size, sizeof(a[0]), cmp);
for(i = 0; i < size; i++)
printf("%i ", a[i]);
return 0;
}