DescriptionThoughZCChasmanyFans,ZCChimselfisacrazyFanofacoder,called"Memset137".ItwasonCodefires(CF),anonlinecompetitiveprogrammingsite,thatZCCknewMemset137,andimmediatelybecamehisfan.Butwhy?BecauseMemset137cansolveallprobleminrounds,withoutunsuccessfulsubmissions;hisestimationoftimetosolvecertainproblemissoaccurate,thathecansurelygetanAcceptedthesecondhehaspredicted.Hesoon...
Manyyearshavepassed,andnfriendsmetatapartyagain.Technologieshaveleapedforwardsincethelastmeeting,cameraswithtimerappearedandnowitisnotobligatoryforoneofthefriendstostandwithacamera,and,thus,beingabsentonthephoto.Simplyspeaking,theprocessofphotographingcanbedescribedasfollows.Eachfriendoccupiesarectangleofpixelsonthephoto:thei-thoftheminastandingstateoccupiesawipixelswideandahipixelshighrectang...
ATMsofawell-knownbankofasmallcountryarearrangedsothattheycannotgiveanyamountofmoneyrequestedbytheuser.Duetothelimitedsizeofthebilldispenser(thedevicethatisdirectlygivingmoneyfromanATM)andsomepeculiaritiesoftheATMstructure,youcangetatmostkbillsfromit,andthebillsmaybeofatmosttwodistinctdenominations.Forexample,ifacountryusesbillswithdenominations10,50,100,500,1000and5000burles,thenatk = ...
DescriptionFarmerJohnneedsnewcows!ThereareNcowsforsale(1<=N<=50,000),andFJhastospendnomorethanhisbudgetofMunitsofmoney(1<=M<=10^14).CowicostsP_imoney(1<=P_i<=10^9),butFJhasKcoupons(1<=K<=N),andwhenheusesacoupononcowi,thecowcostsC_iinstead(1<=C_i<=P_i).FJcanonlyuseonecouponpercow,ofcourse.WhatisthemaximumnumberofcowsFJcanafford?PROBLEMN...
近期评论