
Manyyearshavepassed,andnfriendsmetatapartyagain.Technologieshaveleapedforwardsincethelastmeeting,cameraswithtimerappearedandnowitisnotobligatoryforoneofthefriendstostandwithacamera,and,thus,beingabsentonthephoto.Simplyspeaking,theprocessofphotographingcanbedescribedasfollows.Eachfriendoccupiesarectangleofpixelsonthephoto:thei-thoftheminastandingstateoccupiesawipixelswideandahipixelshighrectang...
![「BZOJ2590」[Usaco2012 Feb] Cow Coupons](http://hzwer.com/wp-content/themes/ly/image/image_post/476EC26F-546E-4F63-95E5-CDF20937CB0C.png)
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...

Leonidwantstobecomeaglasscarver(thepersonwhocreatesbeautifulartworksbycuttingtheglass).Healreadyhasarectangularwmm × hmmsheetofglass,adiamondglasscutterandlotsofenthusiasm.Whathelacksisunderstandingofwhattocarveandhow.Inordernottowastetime,hedecidedtopracticethetechniqueofcarving.Todothis,hemakesverticalandhorizontalcutsthroughtheentiresheet.Thisprocessresultsinmakingsmallerrectangularfra...
![「BZOJ2796」[POI2012] Fibonacci Representation](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_12-27-08.jpg)
DescriptionFib数列0,1,1,2,3,5,8,13,21。给出一个数字,用FIB数列各项加加减减来得到。例如10=5+519=21-217=13+5-11070=987+89-5-1InputInthefirstlineofthestandardinputasinglepositiveintegerisgiven(1<=P<=10)thatdenotesthenumberofqueries.ThefollowinglinesholdasinglepositiveintegerKeach1<=K<=10^17.OutputForeachqueryyourprogramshouldprintonthestandardoutputtheminimumnumberofFibona...

「cf519A」AandBandChess模拟[crayon-690801961247e481738203/]「cf519B」AandBandCompilationErrors排序,双指针对比用个hash/map统计下元素出现次数[crayon-6908019612488607210614/]「cf519C」AandBandTeamTraining实际上答案是min(n,m,(m+n)/3)我分类讨论了TAT还是很好yy的[crayon-690801961248e096464310/]「cf519D」AandBandInterestingSubstringsa[i][j]表示前缀和为i,字母j为末尾的前缀数量每次查询...
近期评论