上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start at the left digit (8 in our number) and count that number of digits to the right (wrapping back to the first 阅读全文
posted @ 2012-09-01 11:21 mtry 阅读(309) 评论(0) 推荐(0)
摘要: Hamming CodesRob KolstadGiven N, B, and D: Find a set of N codewords (1 <= N <= 64), each of length B bits (1 <= B <= 8), such that each of the codewords is at least Hamming distance of D (1 <= D <= 7) away from each of the other codewords. The Hamming distance between a pair of co 阅读全文
posted @ 2012-08-30 18:46 mtry 阅读(490) 评论(0) 推荐(0)
摘要: Healthy HolsteinsBurch & KolstadFarmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vitamin requirement for the cows. Help Farmer John feed his cows so they stay healthy while minimizing t 阅读全文
posted @ 2012-08-30 15:59 mtry 阅读(374) 评论(0) 推荐(0)
摘要: The CastleIOI'94 - Day 1In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have only the winning number for the lottery! Farmer John won a fabulous castle in the Irish countryside.Br 阅读全文
posted @ 2012-08-30 13:54 mtry 阅读(266) 评论(0) 推荐(0)
摘要: Checker ChallengeExamine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from southeast to northwest and southwest to northeast and inc 阅读全文
posted @ 2012-08-29 23:26 mtry 阅读(415) 评论(0) 推荐(0)
摘要: Superprime RibButchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by one, by FJ and the USDA. Farmer John ensures that a purchaser of his prime ribs gets really prime ribs because when sliced from the 阅读全文
posted @ 2012-08-29 22:05 mtry 阅读(493) 评论(0) 推荐(0)
摘要: Number TrianglesConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to the left or diagonally down to the right. 7 ... 阅读全文
posted @ 2012-08-29 21:24 mtry 阅读(325) 评论(0) 推荐(0)
摘要: Prime PalindromesThe number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (5 <= a < b <= 100,000,000); both a a 阅读全文
posted @ 2012-08-29 21:20 mtry 阅读(1047) 评论(0) 推荐(0)
摘要: The ClocksIOI'94 - Day 2Consider nine clocks arranged in a 3x3 array thusly:|-------| |-------| |-------| | | | | | | | |---O | |---O | | O | | | | | | | |-------| |-------| |-------| A ... 阅读全文
posted @ 2012-08-29 10:51 mtry 阅读(440) 评论(0) 推荐(0)
摘要: Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is a non-negative integer and b is a positive integer.Write a program that finds all arithmetic progressions of length n in the set S of bisquares. The set of 阅读全文
posted @ 2012-08-28 21:03 mtry 阅读(277) 评论(0) 推荐(0)
摘要: Mother's MilkFarmer John has three milking buckets of capacity A, B, and C liters. Each of the numbers A, B, and C is an integer from 1 through 20, inclusive. Initially, buckets A and B are empty while bucket C is full of milk. Sometimes, FJ pours milk from one bucket to another until the second 阅读全文
posted @ 2012-08-28 15:46 mtry 阅读(553) 评论(0) 推荐(0)
摘要: Sorting a Three-Valued SequenceIOI'96 - Day 2Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at mostthreedifferent key values. This happens for instance when we sort medalists of a competition accord 阅读全文
posted @ 2012-08-27 20:31 mtry 阅读(347) 评论(0) 推荐(0)
摘要: Ordered FractionsConsider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N.Here is the set when N = 5:0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1Write a program that, given an integer N between 1 and 160 inclusive, prints the fractions in order of 阅读全文
posted @ 2012-08-27 18:55 mtry 阅读(232) 评论(0) 推荐(0)
摘要: Packing RectanglesIOI 95The six basic layouts of four rectanglesFour rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlapping. By smallest rectangle, we mean the one with the smallest area.All four rectangles should have their sides pa 阅读全文
posted @ 2012-08-27 18:46 mtry 阅读(599) 评论(0) 推荐(0)
摘要: Cinema in AkibaTime Limit:3 Seconds Memory Limit:65536 KBCinema in Akiba (CIA)is a small but very popular cinema inAkihabara. Every night the cinema is full of people. The layout ofCIAis very interesting, as there is only one row so that every audience can enjoy the wonderful movies without any anno 阅读全文
posted @ 2012-08-26 23:07 mtry 阅读(442) 评论(0) 推荐(0)
摘要: Ahui Writes WordTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1075Accepted Submission(s): 406Problem DescriptionWe all know that English is very important, so Ahui strive for this in order to learn more English words. To know that word has its va 阅读全文
posted @ 2012-08-23 21:41 mtry 阅读(732) 评论(0) 推荐(0)
摘要: Watch The MovieTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 3057Accepted Submission(s): 996Problem DescriptionNew semester is coming, and DuoDuo has to go to school tomorrow. She decides to have fun tonight and will be very busy after tonight. S 阅读全文
posted @ 2012-08-22 23:14 mtry 阅读(698) 评论(0) 推荐(0)
摘要: I love sneakers!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2229Accepted Submission(s): 910Problem DescriptionAfter months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend 阅读全文
posted @ 2012-08-21 23:07 mtry 阅读(1334) 评论(0) 推荐(0)
摘要: RobberiesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4852Accepted Submission(s): 1844Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because the 阅读全文
posted @ 2012-08-17 09:09 mtry 阅读(4134) 评论(0) 推荐(5)
摘要: Alice and BobTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 55Accepted Submission(s): 33Problem DescriptionAlice and Bob are interested in playing games. One day, they invent a game which has rules below:1.Firstly, Alice and Bob choose some random 阅读全文
posted @ 2012-08-16 19:20 mtry 阅读(2714) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 10 下一页