http://poj.org/problem?id=2388
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 #include<cstdio> 2 #include<algorithm> 3 const int N=10010; 4 using namespace std; 5 int main() 6 { 7 int f[N],n,i; 8 scanf("%d",&n); 9 for (i = 1;i <= n;i ++) 10 scanf("%d",&f[i]); 11 sort(f+1,f+1+n); 12 printf("%d\n",f[(n+1)/2]); 13 return 0; 14 }