#include<iostream>
#include<algorithm>
#include <cstdio>
using namespace std;
bool cmp(int a,int b)
{
return a>b;
}
int main()
{
int num,i;
int arr[10050];
while(scanf("%d",&num)!=EOF)
{
for(i=0;i<num;i++)
cin>>arr[i];
sort(arr,arr+num,cmp);
cout<<arr[(num-1)/2]<<endl;
}
return 0;
}
hdu 1157排序
最新推荐文章于 2018-03-18 10:47:55 发布