bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】
……这可能是早年Pascal盛行的时候考排序的吧居然还是Glod……
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int N=100005;
int n,a[N];
int read()
{int r=0,f=1;char p=getchar();while(p>'9'||p<'0'){if(p=='-')f=-1;p=getchar();}while(p>='0'&&p<='9'){r=r*10+p-48;p=getchar();}return r*f;
}
int main()
{n=read();for(int i=1;i<=n;i++)a[i]=read();sort(a+1,a+1+n);printf("%d\n",a[(1+n)>>1]);return 0;
}
转载于:https://www.cnblogs.com/lokiii/p/8998985.html
bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】相关推荐
- [高精度乘法]BZOJ 1754 [Usaco2005 qua]Bull Math
模板题目,练练手~ #include <iostream> #include <algorithm> #include <cstring> #include < ...
- BZOJ 1738: [Usaco2005 mar]Ombrophobic Bovines 发抖的牛( floyd + 二分答案 + 最大流 )
一道水题WA了这么多次真是.... 统考终于完 ( 挂 ) 了...可以好好写题了... 先floyd跑出各个点的最短路 , 然后二分答案 m , 再建图. 每个 farm 拆成一个 cow 点和一个 ...
- [BZOJ] 1688: [Usaco2005 Open]Disease Manangement 疾病管理
1688: [Usaco2005 Open]Disease Manangement 疾病管理 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 727 S ...
- BZOJ 1688: [Usaco2005 Open]Disease Manangement 疾病管理
题目 1688: [Usaco2005 Open]Disease Manangement 疾病管理 Time Limit: 5 Sec Memory Limit: 64 MB Description ...
- BZOJ 1734: [Usaco2005 feb]Aggressive cows 愤怒的牛( 二分答案 )
最小最大...又是经典的二分答案做法.. -------------------------------------------------------------------------- #inc ...
- bzoj 3392: [Usaco2005 Feb]Part Acquisition 交易(最短路)
3392: [Usaco2005 Feb]Part Acquisition 交易 Time Limit: 5 Sec Memory Limit: 128 MB Submit: 191 Solved ...
- bzoj 1687: [Usaco2005 Open]Navigating the City 城市交通(BFS)
1687: [Usaco2005 Open]Navigating the City 城市交通 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 163 S ...
- bzoj 1676: [Usaco2005 Feb]Feed Accounting 饲料计算(差分)
1676: [Usaco2005 Feb]Feed Accounting 饲料计算 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 252 Solved ...
- bzoj 1675: [Usaco2005 Feb]Rigging the Bovine Election 竞选划区(暴力)
1675: [Usaco2005 Feb]Rigging the Bovine Election 竞选划区 Time Limit: 5 Sec Memory Limit: 64 MB Submit: ...
最新文章
- java数组出现次数最多的数_找出数组中出现次数最多的那个数——主元素问题...
- 通信系统之信道(二)
- mysql %用户域_MySQL运维---用户权限及管理
- BERT模型蒸馏有哪些方法?
- c++两个数组对比去掉重复的元素_30 数组案例
- 敏捷测试与传统测试的区别
- for each in for in for of
- Windows 8 Consumer Preview
- Angr安装与使用之使用篇(三)
- Bug heroes虫虫英雄 超详细翻译+基本攻略
- 她做销售6年,从底薪3K转行程序员狂飙2W,用两年转行经历致想转行的你
- Hellow Python之打包 exe 文件超级试错
- 荣耀3路由器设置虚拟服务器,荣耀路由3怎么设置上网?(电脑)
- 自动化测试框架之unittest
- 金融机房托管解决方案
- Android中AS创建点9图片与使用
- win10系统 jdk8 安装闪退 解决方案
- 如何制作照片马赛克礼物
- 一些古今人物视频——至于励不励志,您自己评判
- bzoj 2653: middle(陈立杰)
热门文章
- mac 安装php5.6 redis 扩展,centos6.5环境 安装php5.6的redis扩展
- volecity引入html,HTML5 Velocity.js 从页面下方跳入页面的登录框
- the c programming language_C.I. 直接黄4(C.I. 24890)生产工艺。 CAS号 [3051114]
- ElasticSearch常用命令记录
- python获取字符串首字母_[Python] Python 获取中文的首字母 和 全部拼音首字母
- mysql + IDEA + JDBC
- mysql 分区索引失效_分区表的本地索引竟然失效了——ORA-01502
- android rfid 读写sdk,Android-SDK-1.0.0-STD android手机调用RFID模块读取电子标签Demo - 下载 - 搜珍网...
- 微脉java面试,微脉医疗开放平台
- pythonturtle库使用心得_记录我的Python学习之旅(一)关于turtle库的基本用法