mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1755.c
This commit is contained in:
parent
13800f40a5
commit
eafa27063a
24
QUSTOJ/1755.c
Normal file
24
QUSTOJ/1755.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define MAXN 1024
|
||||
int pool[MAXN];
|
||||
int cmp(const void* a,const void* b)
|
||||
{
|
||||
return *(int*)b-*(int*)a;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
scanf("%d",&pool[i]);
|
||||
}
|
||||
qsort(pool,n,sizeof(int),cmp);
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
printf("%d ",pool[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user