文件名称:whoisthemiddle
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:816byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
FJ在调查他的奶牛的平均产奶量,他想知道奶牛的产奶量的最中间数,即:一半的奶牛的产奶量比这个中间数多(或者少),另外的一半则刚好相反。
给出一个奇数,表示奶牛的数量N(范围为:1<=N<10000),同时要给出每头奶牛的产奶量,然后找出来最中间的产奶量,这个数也表示大多数的奶牛的产奶量跟这个数差不多。我要做的就是讲输入的这些数进行排序,然后将排序后中间的那个数输出来。
-FJ is surveying his herd to find the most average cow. He wants to know how much milk this median cow gives: half of the cows give as much or more than the median half give as much or less.
Given an odd number of cows N (1 <= N < 10,000) and their milk output (1..1,000,000), find the median amount of milk given such that at least half the cows give the same amount of milk or more and at least half give the same or less.
给出一个奇数,表示奶牛的数量N(范围为:1<=N<10000),同时要给出每头奶牛的产奶量,然后找出来最中间的产奶量,这个数也表示大多数的奶牛的产奶量跟这个数差不多。我要做的就是讲输入的这些数进行排序,然后将排序后中间的那个数输出来。
-FJ is surveying his herd to find the most average cow. He wants to know how much milk this median cow gives: half of the cows give as much or more than the median half give as much or less.
Given an odd number of cows N (1 <= N < 10,000) and their milk output (1..1,000,000), find the median amount of milk given such that at least half the cows give the same amount of milk or more and at least half give the same or less.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
基础强化训练.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.