快排就是好用
![大笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
<pre name="code" class="plain">#include<stdio.h>
int cmp(const void *a,const void *b)
{return *(int *)a-*(int *)b;}
int main()
{
int n,age[10000],i;
while(scanf("%d",&n)!=EOF)
{
for(i=0;i<n;i++)
scanf("%d",&age[i]);
qsort(age,n,sizeof(age[0]),cmp);
printf("%d\n",age[<span style="font-family: Arial, Helvetica, sans-serif;">(n-1)/2</span><span style="font-family: Arial, Helvetica, sans-serif;">]);</span>
}
}