1.3.1 Mixing Milk

摘要: Mixing MilkSince milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low as possible. Help Merry Milk Makers get the milk they need in the cheapest possible manner.The Merry Milk Makers company has several farmers from which they may buy milk, 阅读全文
posted @ 2012-10-03 14:48 makeecat 阅读(163) 评论(0) 推荐(0) 编辑

1.2.5 Dual Palindromes

摘要: Dual PalindromesMario Cruz (Colombia) & Hugo Rickeboer (Argentina)A number that reads the same from right to left as when read from left to right is called a palindrome. The number 12321 is a palindrome; the number 77778 is not. Of course, palindromes have neither leading nor trailing zeroes, so 阅读全文
posted @ 2012-10-03 14:46 makeecat 阅读(144) 评论(0) 推荐(0) 编辑

1.2.4 Palindromic Squares

摘要: Palindromic SquaresRob KolstadPalindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.Given a number base B (2 <= B <= 20 base 10), print all the integers N (1 <= N <= 300 base 10) such that the square of N is palindromic when expressed 阅读全文
posted @ 2012-10-03 14:45 makeecat 阅读(154) 评论(0) 推荐(0) 编辑

1.2.3 Name That Number

摘要: Name That NumberAmong the large Wisconsin cattle ranchers, it is customary to brand cows with serial numbers to please the Accounting Department. The cow hands don't appreciate the advantage of this filing system, though, and wish to call the members of their herd by a pleasing name rather than 阅读全文
posted @ 2012-10-03 14:43 makeecat 阅读(191) 评论(0) 推荐(0) 编辑

1.2.2 Transformations

摘要: TransformationsA square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation that has been applied to the original pattern given the following list of possible transformation 阅读全文
posted @ 2012-10-03 14:42 makeecat 阅读(210) 评论(0) 推荐(0) 编辑

1.2.1 Milking Cows

摘要: Milking CowsThree farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1000. The second farmer begins at time 700 and ends at time 1200. The third farmer begins at time 1500 a 阅读全文
posted @ 2012-10-03 14:41 makeecat 阅读(155) 评论(0) 推荐(0) 编辑

1.1.4 Broken Necklace

摘要: Broken NecklaceYou have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, others blue, and others white, arranged at random. Here are two examples for n=29: 1 2 1 2 r b b r b r r b r... 阅读全文
posted @ 2012-10-03 14:39 makeecat 阅读(164) 评论(0) 推荐(0) 编辑

1.1.3 Friday the Thirteenth

摘要: Friday the ThirteenthIs Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute the frequency that the 13th of each month lands on Sunday, Monday, Tuesday, We 阅读全文
posted @ 2012-10-03 14:36 makeecat 阅读(148) 评论(0) 推荐(0) 编辑

1.1.2 Greedy Gift Givers

摘要: Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive money from any or all of the other friends. Your 阅读全文
posted @ 2012-10-03 14:34 makeecat 阅读(206) 评论(0) 推荐(0) 编辑

1.1.1 Your Ride Is Here

摘要: Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, however, let the groups know ahead of time which will be p 阅读全文
posted @ 2012-10-03 14:32 makeecat 阅读(212) 评论(0) 推荐(0) 编辑