摘要: 生日蛋糕 题目描述 7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1<=i<=M)层蛋糕是半径为Ri, 高度为Hi的圆柱。当i<M时,要求Ri>Ri+1且Hi>Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕 阅读全文
posted @ 2018-10-10 21:29 Kissheart_LMC 阅读(160) 评论(0) 推荐(0)
摘要: Sticks 题目描述 George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to 阅读全文
posted @ 2018-10-10 17:21 Kissheart_LMC 阅读(127) 评论(0) 推荐(0)
摘要: 送礼物 题目描述 作为惩罚,GY被遣送去帮助某神牛给女生送礼物(GY:貌似是个好差事)但是在GY看到礼物之后,他就不这么认为了。某神牛有N个礼物,且异常沉重,但是GY的力气也异常的大(-_-b),他一次可以搬动重量和在w(w<=2^31-1)以下的任意多个物品。GY希望一次搬掉尽量重的一些物品,请你 阅读全文
posted @ 2018-10-09 17:32 Kissheart_LMC 阅读(190) 评论(0) 推荐(0)
摘要: New Game 题目描述 Eagle Jump公司正在开发一款新的游戏。泷本一二三作为其员工,获得了提前试玩的机会。现在她正在试图通过一个迷宫。 这个迷宫有一些特点。为了方便描述,我们对这个迷宫建立平面直角坐标系。迷宫中有两条平行直线 L1:Ax+By+C1=0,L2:Ax+By+C2=0,还有 阅读全文
posted @ 2018-10-07 19:30 Kissheart_LMC 阅读(154) 评论(0) 推荐(0)
摘要: Card Hand Sorting 题目描述 When dealt cards in the card game Plump it is a good idea to start by sorting the cards in hand by suit and rank. The different 阅读全文
posted @ 2018-10-07 11:22 Kissheart_LMC 阅读(221) 评论(0) 推荐(0)
摘要: Exponial 题目描述 Illustration of exponial(3) (not to scale), Picture by C.M. de Talleyrand-Périgord via Wikimedia Commons Everybody loves big numbers (if 阅读全文
posted @ 2018-10-06 21:46 Kissheart_LMC 阅读(160) 评论(0) 推荐(0)
摘要: Fleecing the Raffle 题目描述 A tremendously exciting raffle is being held,with some tremendously exciting prizes being given out. All you have to do to have 阅读全文
posted @ 2018-10-06 20:42 Kissheart_LMC 阅读(163) 评论(0) 推荐(0)
摘要: Model Railroad 题目描述 Since childhood you have been fascinated by model railroads. Designing your own tracks,complicated intersections, train stations w 阅读全文
posted @ 2018-10-05 21:40 Kissheart_LMC 阅读(175) 评论(0) 推荐(0)
摘要: Slot Machines 题目描述 Slot machines are popular game machines in casinos. The slot machine we are considering has six places where a figure appears. By c 阅读全文
posted @ 2018-10-05 10:59 Kissheart_LMC 阅读(202) 评论(0) 推荐(0)
摘要: KMP最小循环节、循环周期: 定理:假设S的长度为len,则S存在最小循环节,循环节的长度L为len-next[len],子串为S[0…len-next[len]-1]。 (1)如果len可以被len - next[len]整除,则表明字符串S可以完全由循环节循环组成,循环周期T=len/L。 (2 阅读全文
posted @ 2018-10-05 10:51 Kissheart_LMC 阅读(486) 评论(0) 推荐(0)