• 「CF460B」Little Dima and Equation

    「CF460B」Little Dima and Equation

    LittleDimamisbehavedduringamathlessonalotandthenastyteacherMr.Picklesgavehimthefollowingproblemasapunishment.Findallintegersolutions x (0 < x < 109) oftheequation:x = b·s(x)a + c, where a, b, c aresomepredeterminedconstantvaluesandfunction s(x) determinesthesumofalldigitsinthedecimalrepresentationofnumber x.TheteachergivesthisproblemtoDimaforeachlesson.Hechangeson...

    02014年8月21日2,372模拟
  • 「CF460A」Vasya and Socks

    「CF460A」Vasya and Socks

    Vasyahas n pairsofsocks.InthemorningofeachdayVasyahastoputonapairofsocksbeforehegoestoschool.Whenhecomeshomeintheevening,Vasyatakesofftheusedsocksandthrowsthemaway.Every m-thday(atdayswithnumbers m, 2m, 3m, ...)mombuysapairofsockstoVasya.Shedoesitlateintheevening,sothatVasyacannotputonanewpairofsocksbeforethenextday.HowmanyconsecutivedayspassuntilVasyarunsoutofsocks?InputThesin...

    02014年8月21日2,294模拟
  • 平面上的最接近点对

    平面上的最接近点对

    http://218.5.5.242:9018/JudgeOnline/problem.php?id=1431题目描述    给定平面上n个点,找出其中的一对点的距离,使得在这n个点的所有点对中,该距离为所有点对中最小的。输入第一行:n;2≤n≤60000接下来n行:每行两个实数:xy,表示一个点的行坐标和列坐标,中间用一个空格隔开。输出       仅一行,一个实数,表示最短距离,精确到小数点后面4位。题解随机分块可水[crayon-6878eee004cdf305353230/] ...

    02014年8月20日3,776随机化
  • 「CF459E」Pashmak and Graph

    「CF459E」Pashmak and Graph

    Pashmak'shomeworkisaproblemaboutgraphs.Althoughhealwaystriestodohishomeworkcompletely,hecan'tsolvethisproblem.Asyouknow,he'sreallyweakatgraphtheory;sotrytohelphiminsolvingtheproblem.Youaregivenaweighteddirectedgraphwith n verticesand m edges.Youneedtofindapath(perhaps,non-simple)withmaximumnumberofedges,suchthattheweightsoftheedgesincreasealongthepath.Inotherwords,eachedgeofthepathmustha...

    02014年8月20日2,838递推与动规
  • 「ch52」还教室

    「ch52」还教室

    还教室还记得NOIP2012提高组Day2中的借教室吗?时光飞逝,光阴荏苒,两年过去了,曾经借教室的同学们纷纷归还自己当初租借的教室。请你来解决类似于借教室的另一个问题。「问题描述」在接受借教室请求的n天中,第i天剩余的教室为ai个。作为大学借教室服务的负责人,你需要完成如下三种操作共m次:1第l天到第r天,每天被归还d个教室。2询问第l天到第r天教室个数的平均数。3询问第l天到第r天教室个数的方差。「输入格式」第一行包括两个...

    12014年8月18日4,468线段树
  • 善良的hzwer

    善良的hzwer

    同公主的工作由于本题难度太高,善良的hzwer说:“为了方便旅客串门,还是将他们的房间安排为相邻的一排为好233。”对于每一天输出一行依次代表选取的房间高度,房间必须相邻,若不能安排则输出Impossible。(为了减少输出所需时间,只需输出第一个数即可)因为在做wulala的神模拟赛的时候题目看错了就出了这么一题TT做法是求出每个点为开头向后的连续上升序列长度然后可以搞一个答案数组TT,比如以字典序最小的数x1开头的长度为a...

    02014年8月17日3,153贪心,单调栈
  • 「NOIP模拟赛by wulala」公主的游戏

    「NOIP模拟赛by wulala」公主的游戏

    wulala:不就一傻逼贪心吗……就是把公主的wulala的牌都排序一下然后贪心。。。我只排序wulala的牌,然后把公主的牌放进平衡树TT每次找后继不过有了set这样并不会比正解难写,反倒是更为直接2333[crayon-6878eee005ba4762361238/] ...

    22014年8月16日3,034贪心
  • 「NOIP模拟赛by wulala」公主的朋友

    「NOIP模拟赛by wulala」公主的朋友

    出题人说:正解分块。。。但是这不是和某次cf的dzylovescolor一样么TT修改的时候顺便查询,如果要修改的这一段宗教相同,打个标记并且统计答案后return否则递归复杂度我们可以这样想因为如果修改1-n,但是宗教都不同,这样是每个都要递归到最下面,这样一次修改就要nlogn但是这种情况并不会一直出现,询问完后1-n会被修改成同一种宗教,再把1-n变成不同的,又要额外修改n次也就是说,每次修改,最多让后面的查询多一个logn所以这样...

    02014年8月16日2,877线段树
  • 「NOIP模拟赛by wulala」公主的工作

    「NOIP模拟赛by wulala」公主的工作

    和bzoj1046并没多大差别吧。。。[crayon-6878eee006593972554391/] 

    02014年8月16日3,000递推与动规,贪心
  • 「CF459C」Pashmak and Buses

    「CF459C」Pashmak and Buses

    RecentlyPashmakhasbeenemployedinatransportationcompany.Thecompanyhas k busesandhasacontractwithaschoolwhichhas n students.Theschoolplannedtotakethestudentsto d differentplacesfor d days(eachdayinoneplace).Eachdaythecompanyprovidesallthebusesforthetrip.Pashmakhastoarrangethestudentsinthebuses.Hewantstoarrangethestudentsinawaythatnotwostudentsbecomeclosefriends.Inhisridiculousidea,tw...

    02014年8月16日4,332构造
  • 「CF459B」Pashmak and Flowers

    「CF459B」Pashmak and Flowers

    PashmakdecidedtogiveParmidaapairofflowersfromthegarden.Thereare n flowersinthegardenandthe i-thofthemhasabeautynumber bi.Parmidaisaverystrangegirlsoshedoesn'twanttohavethetwomostbeautifulflowersnecessarily.Shewantstohavethosepairsofflowersthattheirbeautydifferenceismaximalpossible!Yourtaskistowriteaprogramwhichcalculatestwothings:ThemaximumbeautydifferenceofflowersthatPashmakcangivetoP...

    02014年8月16日2,325模拟
  • 「CF459A」Pashmak and Garden

    「CF459A」Pashmak and Garden

    PashmakhasfalleninlovewithanattractivegirlcalledParmidasinceoneyearago...Today,Pashmaksetupameetingwithhispartnerinaromanticgarden.Unfortunately,Pashmakhasforgottenwherethegardenis.Butheremembersthatthegardenlookslikeasquarewithsidesparalleltothecoordinateaxes.Healsoremembersthatthereisexactlyonetreeoneachvertexofthesquare.Now,Pashmakknowsthepositionofonlytwoofthetrees.Helphimtofindthep...

    02014年8月16日3,044模拟
69 / 144 « 上一页 1 ...67 68 69 70 71 ...144 下一页 »