POJ 2388 Who's in the Middle(水~奇数个数排序求中位数)
2016-10-08 22:11
519 查看
题目链接:http://poj.org/problem?id=2388
题目大意:
奇数个数排序求中位数
解题思路:看代码吧!
AC Code:
题目大意:
奇数个数排序求中位数
解题思路:看代码吧!
AC Code:
1 #include<stdio.h> 2 #include<algorithm> 3 using namespace std; 4 int main() 5 { 6 int n; 7 while(scanf("%d",&n)!=EOF) 8 { 9 int na[n+1]; 10 for(int i=0; i<n; i++) 11 scanf("%d",&na[i]); 12 sort(na,na+n); 13 printf("%d\n",na[n/2]); 14 } 15 return 0; 16 }
相关文章推荐
- poj 2388 Who's in the Middle(快速排序求中位数)
- poj 2388 Who's in the Middle(快速排序求中位数)
- poj 2388 Who's in the Middle(快速排序求中位数)
- poj2388-Who's in the Middle(排序)
- poj 2388 Who's in the Middle-----qsort 排序
- Who's in the Middle - poj 2388 (快速排序寻找中位数)
- Poj 2388 Who's in the Middle【排序】
- POJ 2388 Who's in the Middle 排序
- HDU 1157 POJ 2388 Who's in the Middle 求中位数
- poj 2388 Who's in the Middle
- 【原】 POJ 2388 Who's in the Middle 中位数 解题报告
- POJ2388-Who's in the Middle
- poj 2388 Who's in the Middle【sort排序】
- poj 2388 -- Who's in the Middle
- POJ训练计划2388_Who's in the Middle(排序)
- poj_2388 Who's in the Middle(排序)
- POJ 2388 Who's in the Middle(堆排序)
- Poj 2388 Who's in the Middle
- POJ 2388 Who's in the Middle (排序 快排复习)
- POJ 2388 Who's in the Middle(排序)