首页 > 其他 > 详细

BZOJ 1753 Who's in the Middle

时间:2016-05-08 13:45:48      阅读:183      评论:0      收藏:0      [点我收藏+]

排序一下。

#include<iostream>
#include<cstdio>
#include<algorithm>
#define maxn 10050
using namespace std;
int n,a[maxn];
int main()
{
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
        scanf("%d",&a[i]);
    sort(a+1,a+n+1);
    printf("%d\n",a[(n+1)>>1]);
    return 0;
}

 

BZOJ 1753 Who's in the Middle

原文:http://www.cnblogs.com/ziliuziliu/p/5470365.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!