poj 2388 Who's in the Middle
来源:互联网 发布:婴儿毯子知乎 编辑:程序博客网 时间:2024/05/17 00:53
题目大意:给出N个奇数,输出它的中间那个数。
分析:直接sort.
代码:
#include<iostream>#include<algorithm>using namespace std;int s[1000001];int main(){ int n; while(cin>>n) { for(int i=0;i<n;i++) cin>>s[i]; sort(s,s+n); cout<<s[n/2]<<endl; } return 0;}
- 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
- 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
- POJ 2388 Who's in the Middle
- poj 2388 Who's in the Middle
- Who's in the Middle(poj 2388)
- POJ 2388:Who's in the Middle
- 像素风保护套: iPad变身信封啦!
- 在线重定义过程中需要exclusive lock.
- 获取系统时间
- C# wince 蜂鸣器 发声 C#调用设备驱动函数
- POJ 1915 Knight Moves bfs
- poj 2388 Who's in the Middle
- IIS6中301重定向设置
- H264 RTP打包发送
- VC++ 内核对象Event
- 真机调试出现问题,无法将应用程序装到设备上
- 在不同cpp中使用同一个变量
- jquery ---表单验证
- OAUTH协议简介
- error: Apostrophe not preceded by \ (in haven't input accoount or it isn't a legal E-mail)