HDU 1157 Who's in the Middle
2013-12-25 16:40
239 查看
#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\n",a[n/2]); } return 0; }
相关文章推荐
- Hdu 1157 Who's in the Middle
- [HDU] 1157 Who's in the Middle - 不排序查找第x小的元素,时间复杂度接近o(n)
- 【hdu - 1157 Who's in the Middle】
- HDU—— 1157 Who's in the Middle
- HDU 1157 POJ 2388 Who's in the Middle 求中位数
- hdu 1157 (1.3.7) Who's in the Middle
- 杭电 HDU 1157 Who's in the Middle
- hdu-oj 1157 Who's in the Middle
- HDU 1157(Who's in the Middle) 快速排序
- hdu 1157 Who's in the Middle(poj…
- HDU-1157-Who's in the Middle
- HDU 1157 Who's in the Middle 排序
- HDU 1157 Who's in the Middle
- HDU 1157 Who's in the Middle
- HDU 1157 Who's in the Middle
- POJ 2388 && HDU 1157 Who's in the Middle(水~)
- 文章标题 HDU 1157 : Who's in the Middle(水)
- HDU 1157 Who's in the Middle
- HDU 1157 Who's in the Middle
- HDU 1157 Who's in the Middle (快速排序 or 任意排序)