| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
60题就给水了。。。。。。。#include <map>
#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n;
int a[10000+5];
while(scanf("%d",&n)!=EOF){
for(int i=1;i<=n;++i)scanf("%d",&a[i]);
sort(a+1,a+n+1);
printf("%d\n",a[(n+1)/2]);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator