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 |
太水了,两分钟写完代码AC#include<iostream> #include<cstdlib> #include<cstdio> #include<algorithm> using namespace std; const int maxn=10000+10; int p[maxn]; int main(){ int n; cin>>n; for(int i=0;i<n;i++) cin>>p[i]; sort(p,p+n); cout<<p[n/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