POJ2388
来源:互联网 发布:万岁冲锋知乎 编辑:程序博客网 时间:2024/05/03 13:11
摘要:数据太弱,排序就过了。可以做到o(n)
#include <iostream>
#include <algorithm>
using namespace std;
const int size = 10000;
int input[size+1] = {0};
int main()
{
int n;
scanf("%d", &n);
for(int i=1; i<=n; i++){
scanf("%d", &input[i]);
}
sort(input+1, input+n+1);
printf("%d/n", input[(n+1)/2]);
return 0;
}
- poj2388
- POJ2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- POJ2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- poj2388
- POJ2371
- 深入探讨透视投影坐标变换
- 我心飞扬
- 远程桌面传文件
- nginx 缓存服务器
- POJ2388
- 编导是做什么的?编导具体做什么
- 浅谈SUN JVM内存管理与应用服务器的优化 之SUN JVM内存管理
- 利用InstallShield12制作安装包之三:判断操作系统类型的多种方法
- VC++中什么是BSTR、LPSTR以及LPWSTR呢
- POJ2418
- Eclipse3.2.2中安装Spring IDE2.0.1
- POJ2632
- db_cache_size、shared_pool_size一些初始化参数为什么是0?