……这可能是早年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;
}

bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】的更多相关文章

  1. 1753: [Usaco2005 qua]Who's in the Middle

    1753: [Usaco2005 qua]Who's in the Middle Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 290  Solved:  ...

  2. BZOJ 1754: [Usaco2005 qua]Bull Math

    Description Bulls are so much better at math than the cows. They can multiply huge integers together ...

  3. bzoj 1755: [Usaco2005 qua]Bank Interest【模拟】

    原来强行转int可以避免四舍五入啊 #include<iostream> #include<cstdio> using namespace std; int r,y; doub ...

  4. bzoj 1754: [Usaco2005 qua]Bull Math【高精乘法】

    高精乘法板子 然而WA了两次也是没救了 #include<iostream> #include<cstdio> #include<cstring> using na ...

  5. bzoj1753 [Usaco2005 qua]Who's in the Middle

    Description FJ is surveying his herd to find the most average cow. He wants to know how much milk th ...

  6. 1755: [Usaco2005 qua]Bank Interest

    1755: [Usaco2005 qua]Bank Interest Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 187  Solved: 162[Su ...

  7. BZOJ1754: [Usaco2005 qua]Bull Math

    1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 374  Solved: 227[Submit ...

  8. bzoj1751 [Usaco2005 qua]Lake Counting

    1751: [Usaco2005 qua]Lake Counting Time Limit: 5 Sec  Memory Limit: 64 MB Submit: 168  Solved: 130 [ ...

  9. 1754: [Usaco2005 qua]Bull Math

    1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 398  Solved: 242[Submit ...

随机推荐

  1. Mysql学习总结(43)——MySQL主从复制详细配置

    环境 操作系统:CentOS-6.6-x86_64-bin-DVD1.iso MySQL版本:mysql-5.6.26.tar.gz 主节点IP:192.168.1.205 主机名:edu-mysql ...

  2. Android 网络连接状态的监控

    有些应用需要连接网络,例如更新后台服务,刷新数据等,最通常的做法是定期联网,直接使用网上资源.缓存数据或执行一个下载任务来更新数据. 但是如果终端设备没有连接网络,或者网速较慢,就没必要执行这些任务. ...

  3. 利用try-catch代码检查用户输入数据是否是有效的浮点数超级详细

    package chapter6; //数据输入格式检查 import java.io.IOException; import java.util.InputMismatchException; im ...

  4. VMware配置从U盘启动

    很遗憾,VMware的BIOS不能识别USB启动设备,即使已经把USB设备连接上去. 解决这一问题的做法是直接添加硬盘,硬盘指向物理硬盘,即USB设置. 注意:Ubuntu下要设置这一功能需要使用su ...

  5. redhat and centos 系统经常使用命令

    查看cpu信息:     more /proc/cpuinfo |grep "model name"     通常是至强系统 查看内存信息:     grep MemTotal / ...

  6. NBUT 1450 Blitzcrank

    [1450] Blitzcrank 时间限制: 1000 ms 内存限制: 65535 K 问题描写叙述 Blitzcrank is a robot. There are some pretty go ...

  7. ImportError: No module named MySQLdb解决办法

    http://blog.slogra.com/post-429.html http://blog.sina.com.cn/s/blog_74a7e56e0101a7qy.html 今天突发奇想在服务器 ...

  8. Django学习系列之django restframework

    曾几何时,Ajax已经统治了Web开发中的客户端,而REST成为web世界中最流行的架构风格(architecture style).所以我们的选择变得很简单:前端ajax访问后端的RESTful A ...

  9. Django打造大型企业官网(三)

    四.前端首页 4.1.导航条实现 (1)templates/new/index.html <!DOCTYPE html> <html lang="en"> ...

  10. iOS xcode6最新提交app方法

    依照之前方式打包.打包成功后.直接submit提交AppStore.然后再选择build,假设上传成功,但在build选择上未出现,你能够耐心等待.有可能要等上一天,然后选择相应的build,直接提交 ...