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 |
stl水过...上代码#include <cstdio> #include <algorithm> int d[10010]; int n; int main() { int i; scanf("%d",&n); for (i=0;i<n;++i) scanf("%d",&d[i]); std::nth_element(d,d+n/2,d+n); printf("%d\n",d[n/2]); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator