摘要:Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:7991Accepted:4605DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, f
阅读全文
随笔分类 - POJ
POJ solutions
摘要:Maximum sumTime Limit:1000MSMemory Limit:65536KTotal Submissions:27256Accepted:8329DescriptionGiven a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:Your task is to calculate d(A).InputThe input consists of T(<=30) test cases. The number of test cases (T) is given in th
阅读全文
摘要:PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:41570Accepted:14164DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal number of
阅读全文
摘要:SticksTime Limit:1000MSMemory Limit:10000KTotal Submissions:95592Accepted:21482DescriptionGeorge 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 the original state, but he forgot how many sticks he had originally and
阅读全文
摘要:Eating TogetherTime Limit:1000MSMemory Limit:65536KTotal Submissions:4383Accepted:2149DescriptionThe cows are so very silly about their dinner partners. They have organized themselves into three groups (conveniently numbered 1, 2, and 3) that insist upon dining together. The trouble starts when they
阅读全文
摘要:Color a TreeTime Limit:1000MSMemory Limit:30000KTotal Submissions:5832Accepted:1930DescriptionBob is very interested in the data structure of a tree. A tree is a directed graph in which a special node is singled out, called the "root" of the tree, and there is a unique path from the root t
阅读全文
摘要:POJ推荐50题1.标记“难”和“稍难”的题目可以看看,思考一下,不做要求,当然有能力的同学可以直接切掉。2.标记为A and B的题目是比较相似的题目,建议大家两个一起做,可以对比总结,且二者算作一个题目。3.列表中大约有70个题目。大家选做其中的50道,且每类题目有最低数量限制。4.这里不少题目在BUPT ACM FTP上面都有代码,请大家合理利用资源。5. 50个题目要求每个题目都要写总结,养成良好的习惯。9.这个列表的目的在于让大家对各个方面的算法有个了解,也许要求有些苛刻,教条,请大家谅解,这些是我们这些年的经验总结,所以也请大家尊重我们的劳动成果。第一类 动态规划(至少6题,247
阅读全文
摘要:Heavy TransportationTime Limit:3000MSMemory Limit:30000KTotal Submissions:14202Accepted:3748DescriptionBackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cu
阅读全文
摘要:Blue JeansTime Limit:1000MSMemory Limit:65536KTotal Submissions:7671Accepted:3184DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was populated.As an IBM
阅读全文
摘要:Jungle RoadsTime Limit:1000MSMemory Limit:10000KTotal Submissions:14632Accepted:6541DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the
阅读全文
摘要:Drainage DitchesTime Limit:1000MSMemory Limit:10000KTotal Submissions:38934Accepted:14449DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow.
阅读全文
摘要:NetworkTime Limit:1000MSMemory Limit:10000KTotal Submissions:6365Accepted:2988DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The lines are bidirectional
阅读全文
摘要:Octal FractionsTime Limit:1000MSMemory Limit:10000KTotal Submissions:4968Accepted:2670DescriptionFractions in octal (base 8) notation can be expressed exactly in decimal notation. For example, 0.75 in octal is 0.953125 (7/8 + 5/64) in decimal. All octal numbers of n digits to the right of the octal
阅读全文
摘要:ExponentiationTime Limit:500MSMemory Limit:10000KTotal Submissions:87049Accepted:20682DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.Thi
阅读全文
摘要:Sequence MedianTime Limit:1000MSMemory Limit:65536KTotal Submissions:11487Accepted:3273DescriptionGiven a sequence of N nonnegative integers. Let's define the median of such sequence. If N is odd the median is the element with stands in the middle of the sequence after it is sorted. One may noti
阅读全文
摘要:位操作Time Limit:1000MSMemory Limit:65536KTotal Submissions:6586Accepted:2532Description假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0位,最高位为第31位),将第Y位开始的连续三位设置成110(从高位到低位的顺序),而其他位保持不变。对给定的寄存器值R,及X,Y,编程计算更改后的寄存器值R。Input仅一行,包括R,X,Y,以逗号","分隔,R为16进制表示的32位整数,X,Y在0-31之间且Y>=3,(Y-X)的绝对值>=3,保证两次置位不
阅读全文
摘要:时间日期格式转换Time Limit:1000MSMemory Limit:65536KTotal Submissions:5000Accepted:2296Description世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”,此次编程大赛的启动日期“2009/11/07”就是符合这种格式的一个日期,而北美所用的日期格式则为“月月/日日/年年年年”或”mm/dd/yyyy”,如将“2009/11/07”改成这种格式,对应的则是”11/07/2009”。对于时间的格式,则常有12小时制和24小时制的
阅读全文
摘要:JackpotTime Limit:1000MSMemory Limit:65536KTotal Submissions:3703Accepted:1212DescriptionBill has found the perfect way to make money playing the slot machines. After months of careful research, he has finally figured out the mechanics behind how the machines operate. Now he is ready to make profit
阅读全文
摘要:Card TrickTime Limit:1000MSMemory Limit:65536KTotal Submissions:2673Accepted:1957DescriptionThe magician shuffles a small pack of cards, holds it face down and performs the following procedure:The top card is moved to the bottom of the pack. The new top card is dealt face up onto the table. It is th
阅读全文
摘要:Relative RelativesTime Limit:1000MSMemory Limit:30000KTotal Submissions:2891Accepted:1251DescriptionToday is Ted's 100th birthday. A few weeks ago, you were selected by the family to contact all of Ted's descendants and organize a surprise party. To make this task easier, you created an age-
阅读全文

浙公网安备 33010602011771号