上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页
摘要: A Mysterious FunctionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3517Accepted: 2398DescriptionFor any integers p and q with q > 0, define p mod q to be the integer r with 0 <= r <= q −1 such that p−r is divisible by q. For example, we have 109 mod 10 = 9−7 mod 3 = 2−56 mod 7 = 阅读全文
posted @ 2011-11-22 13:04 w0w0 阅读(196) 评论(0) 推荐(0)
摘要: Numeral SystemTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1887Accepted: 1458DescriptionProf. Hachioji has devised a new numeral system of integral numbers with four lowercase letters "m", "c", "x", "i" and with eight digits "2", "3& 阅读全文
posted @ 2011-11-22 13:03 w0w0 阅读(239) 评论(0) 推荐(0)
摘要: Anagrammatic DistanceTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3754Accepted: 2118DescriptionTwo words are said to be anagrams of each other if the letters from one word can be rearranged to form the other word. For example, occurs is an anagram of succor; however, dear is not an anagr 阅读全文
posted @ 2011-11-22 13:01 w0w0 阅读(231) 评论(0) 推荐(0)
摘要: TreesTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8104Accepted: 5385DescriptionThe road off the east gate of Peking University used to be decorated with a lot of trees. However, because of the construction of a subway, a lot of them are cut down or moved away. Now please help to count ho 阅读全文
posted @ 2011-11-22 13:00 w0w0 阅读(197) 评论(0) 推荐(0)
摘要: Tri TilingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5805Accepted: 3099DescriptionIn how many ways can you tile a 3xn rectangle with 2x1 dominoes? Here is a sample tiling of a 3x12 rectangle. InputInput consists of several test cases followed by a line containing -1. Each test case is 阅读全文
posted @ 2011-11-22 12:59 w0w0 阅读(307) 评论(0) 推荐(0)
摘要: Prerequisites?Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 3005Accepted: 1896DescriptionFreddie the frosh has chosen to take k courses. To meet the degree requirements, he must take courses from each of several categories. Can you assure Freddie that he will graduate, based on his course 阅读全文
posted @ 2011-11-22 12:59 w0w0 阅读(173) 评论(0) 推荐(0)
摘要: Rock-Paper-Scissors TournamentTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 1891Accepted: 751DescriptionRock-Paper-Scissors is game for two players, A and B, who each choose, independently of the other, one of rock, paper, or scissors. A player chosing paper wins over a player chosing roc 阅读全文
posted @ 2011-11-22 12:58 w0w0 阅读(535) 评论(0) 推荐(0)
摘要: Unhappy JinjinTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8861Accepted: 6528DescriptionJinjin is a junior school student. Besides the classes in school, Jinjin's mother also arranges some supplementary classes for her. However, if Jinjin studies for more than eight hours a day, she 阅读全文
posted @ 2011-11-22 12:58 w0w0 阅读(168) 评论(0) 推荐(0)
摘要: ElectionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3248Accepted: 1552DescriptionCanada has a multi-party system of government. Each candidate is generally associated with a party, and the party whose candidates win the most ridings generally forms the government. Some candidates run as 阅读全文
posted @ 2011-11-22 12:57 w0w0 阅读(182) 评论(0) 推荐(0)
摘要: Electrical OutletsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6964Accepted: 5316DescriptionRoy has just moved into a new apartment. Well, actually the apartment itself is not very new, even dating back to the days before people had electricity in their houses. Because of this, Roy's 阅读全文
posted @ 2011-11-22 12:56 w0w0 阅读(228) 评论(0) 推荐(0)
摘要: BilliardTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1160Accepted: 736DescriptionIn a billiard table with horizontal side a inches and vertical side b inches, a ball is launched from the middle of the table. After s > 0 seconds the ball returns to the point from which it was launched, 阅读全文
posted @ 2011-11-22 12:56 w0w0 阅读(185) 评论(0) 推荐(0)
摘要: Sequence MedianTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12242Accepted: 3521DescriptionGiven 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 阅读全文
posted @ 2011-11-22 12:55 w0w0 阅读(247) 评论(0) 推荐(0)
摘要: Common permutationTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5059Accepted: 1519DescriptionGiven two strings of lowercase letters, a and b, print the longest string x of lowercase letters such that there is a permutation of x that is a subsequence of a and there is a permutation of x th 阅读全文
posted @ 2011-11-22 12:55 w0w0 阅读(263) 评论(0) 推荐(0)
摘要: Mine SweeperTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5569Accepted: 2180DescriptionThe game Minesweeper is played on an n by n grid. In this grid are hidden m mines, each at a distinct grid location. The player repeatedly touches grid positions. If a position with a mine is touched, t 阅读全文
posted @ 2011-11-22 12:54 w0w0 阅读(227) 评论(0) 推荐(0)
摘要: Rabbit huntTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6017Accepted: 2943DescriptionA good hunter kills two rabbits with one shot. Of course, it can be easily done since for any two points we can always draw a line containing the both. But killing three or more rabbits in one shot is mu 阅读全文
posted @ 2011-11-22 12:53 w0w0 阅读(213) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页