2013年4月21日

摘要: BicoloringIn 1976 the ``Four Color Map Theorem" was proven with the assistance of a computer. This theorem states that every map can be colored using only four colors, in such a way that no region is colored using the same color as a neighbor region.Here you are asked to solve a simpler similar 阅读全文
posted @ 2013-04-21 20:49 彳亍豆 阅读(134) 评论(0) 推荐(0)

2013年4月18日

摘要: Station BalanceThe International Space Station contains many centrifuges in its labs. Each centrifuge will have some number (C) of chambers each of which can contain 0, 1, or 2 specimens. You are to write a program which assigns all S specimens to the chambers such that no chamber contains more than 阅读全文
posted @ 2013-04-18 21:56 彳亍豆 阅读(155) 评论(0) 推荐(0)

2013年4月14日

摘要: Problem C: DivisibilityConsider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expressions that evaluate to different values. Let us, for example, take the sequence: 17, 5, -21, 15. There are eight possible exp 阅读全文
posted @ 2013-04-14 23:24 彳亍豆 阅读(147) 评论(0) 推荐(0)
 
摘要: CDYou have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tapeNminutes long. How to choose tracks from CD to get most out of tape space and have as short unused space as possible.As 阅读全文
posted @ 2013-04-14 23:22 彳亍豆 阅读(268) 评论(0) 推荐(0)
 
摘要: Dividing coinsIt's commonly known that the Dutch have invented copper-wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so eager to get it and the fighting was so fierce, they stretched the coin to great length and thus created copper-wire.Not commonly kno 阅读全文
posted @ 2013-04-14 23:21 彳亍豆 阅读(201) 评论(0) 推荐(0)
 
摘要: Problem I: Ingenuous CubrencyPeople in Cubeland use cubic coins. Not only the unit of currency is called acubebut also the coins are shaped like cubes and their values are cubes. Coins with values of all cubic numbers up to 9261 (= 213), i.e., coins with the denominations of 1, 8, 27,...,up to 9261c 阅读全文
posted @ 2013-04-14 23:18 彳亍豆 阅读(212) 评论(0) 推荐(0)
 
摘要: Luggage Peter and his friends are on holiday, so they have decided to make a trip by car to know the north of Spain. They are seven people and they think that two cars are enough for their luggage.It’s time to leave… and a heap of suitcases are awaiting out of the cars. The drivers disagree about w. 阅读全文
posted @ 2013-04-14 23:16 彳亍豆 阅读(159) 评论(0) 推荐(0)
 
摘要: The Candyman Can``Who can take a sunriseSprinkle it with dewCover it in chocolate and a miracle or twoThe Candy ManThe Candy Man canThe Candy Man can 'cause he mixes it with loveAnd makes the world taste good"(taken from the movie "Willy Wonka and the Chocolate Factory", 1971)The 阅读全文
posted @ 2013-04-14 23:15 彳亍豆 阅读(184) 评论(0) 推荐(0)
 
摘要: Stacks of FlapjacksBackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete event simulation. Stacks are also important in the theory of formal languages.This problem involves both butter and suste 阅读全文
posted @ 2013-04-14 12:38 彳亍豆 阅读(164) 评论(0) 推荐(0)
 
摘要: Shoemaker's ProblemShoemaker has N jobs (orders from customers) which he must make. Shoemaker can work on only one job in each day. For each ith job, it is known the integer Ti (1<=Ti<=1000), the time in days it takes the shoemaker to finish the job. For each day of delay before starting t 阅读全文
posted @ 2013-04-14 10:54 彳亍豆 阅读(205) 评论(0) 推荐(0)