DescriptionFJissurveyinghisherdtofindthemostaveragecow.Hewantstoknowhowmuchmilkthis'median'cowgives:halfofthecowsgiveasmuchormorethanthemedian;halfgiveasmuchorless.GivenanoddnumberofcowsN(1<=N<10,000)andtheirmilkoutput(1..1,000,000),findthemedianamountofmilkgivensuchthatatleasthalfthecowsgivethesameamountofmilkormoreandatleasthalfgivethesameorless.输入N个数,输出升序排列后中间那个数.I...
近期评论