HDU 1157 Who's in the Middle

#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int a[100000];
        for(int i=0; i<n; i++)
        scanf("%d",&a[i]);
        sort(a,a+n);
        printf("%d
",a[n/2]);
    }
    return 0;
}
原文地址:https://www.cnblogs.com/forever97/p/3490962.html