hdu1029_大水题(思维)
来源:互联网 发布:淘宝神笔 编辑:程序博客网 时间:2024/05/01 09:10
解:
(额,省赛的热身赛上的水题,1分钟a掉)
排序,输出中间的那个数。
代码:
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int maxn=999999;int a[maxn];int main(){ int t; while(scanf("%d",&t)!=-1) { for(int i=0;i<t;i++)scanf("%d",&a[i]); sort(a,a+t); //for(int i=0;i<t;i++)printf("%d ",a[i]); printf("%d\n",a[t/2]); } return 0;}
0 0
- hdu1029_大水题(思维)
- hdu1018(大水题)
- poj1154(大水题)
- 大水题!!!
- 大水题
- hdu 2550 百步穿杨(大水题)
- UVA 575(模拟大水题)
- BNU 斩(超级大水题)
- HDU 5365 Run(大水题)
- 大水题(正整数序列,uva 11384)
- 【cqbzoj2468】反素数 (终极大水题)
- Lightoj 1166 Old Sorting(大水题)
- poj 1656 大水题
- POJ 2328 大水题
- hdu 4247 大水题
- hdu4252 大水题
- hdu 4206 大水题
- 大水题Q2002
- c++中vector的用法详解
- pgsql:删除表中重复数据保留其中的一条
- JavaScript获取非行间样式的方法
- app启动融云数据库出错小记
- How to close all the ports in ubuntu except those I need them
- hdu1029_大水题(思维)
- Ubuntu之间配置互相SSh免密登陆
- C#学习笔记(二)---在C#中创建类(上)
- Ubuntu 16.10用户密码找回
- EventBus的使用与原理 组件通信 线程通信(1)
- 李炎恢JQuery EasyUI视频培训视频教程下载
- 推荐Leangoo团队协作的20个理由
- linux mkdir
- Retrofit 2.0源码分析