DescriptionEverthematuringbusinessman,FarmerJohnrealizesthathemustmanagehistimeeffectively.HehasNjobsconvenientlynumbered1..N(1<=N<=1,000)toaccomplish(likemilkingthecows,cleaningthebarn,mendingthefences,andsoon).Tomanagehistimeeffectively,hehascreatedalistofthejobsthatmustbefinished.JobirequiresacertainamountoftimeT_i(1<=T_i<=1,000)tocompleteandfurthermoremustbefinishedbyti...
DescriptionFJ'sN(1<=N<=10,000)cowsconvenientlyindexed1..Narestandinginaline.Eachcowhasapositiveintegerheight(whichisabitofsecret).YouaretoldonlytheheightH(1<=H<=1,000,000)ofthetallestcowalongwiththeindexIofthatcow.FJhasmadealistofR(0<=R<=10,000)linesoftheform"cow17seescow34".Thismeansthatcow34isatleastastallascow17,andthateverycowbetween17and34hasaheightthatisstri...
Valeraisalittleboy.YesterdayhegotahugeMathhometaskatschool,soValeradidn'thaveenoughtimetoproperlylearntheEnglishalphabetforhisEnglishlesson.Unfortunately,theEnglishteacherdecidedtohaveatestonalphabettoday.AtthetestValeragotasquarepieceofsquaredpaper.Thelengthofthesideequals n squares(n isanoddnumber)andeachunitsquarecontainssomesmallletteroftheEnglishalphabet.Valeraneedstoknowifthe...
近期评论