摘要: ClockHandsThe medieval interest in mechanical contrivances is well illustrated by the development of the mechanical clock, the oldest of which is driven by weights and controlled by a verge, an oscillating arm engaging with a gear wheel. It dates back to 1386.Clocks driven by springs had appeared by 阅读全文
posted @ 2013-02-23 05:58 三人木君 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Problem B: MinesweeperThe ProblemHave you ever played Minesweeper? It's a cute little game which comes within a certain Operating System which name we can't really remember. Well, the goal of the game is to find where are all the mines within a MxN field. To help you, the game shows a number 阅读全文
posted @ 2013-02-23 05:41 三人木君 阅读(346) 评论(0) 推荐(0) 编辑
摘要: Factors and FactorialsThe factorial of a numberN(writtenN!) is defined as the product of all the integers from 1 toN. It is often defined recursively as follows:Factorials grow very rapidly--5! = 120, 10! = 3,628,800. One way of specifying such large numbers is by specifying the number of times each 阅读全文
posted @ 2013-02-23 05:27 三人木君 阅读(326) 评论(0) 推荐(0) 编辑
摘要: It is said that 90% of frosh expect to be above average in their class. You are to provide a reality check.The first line of standard input contains an integer C, the number of test cases. C data sets follow. Each data set begins with an integer, N, the number of people in the class (1 <= N <= 阅读全文
posted @ 2013-02-23 05:10 三人木君 阅读(215) 评论(0) 推荐(0) 编辑
摘要: PerfectionFrom the article Number Theory in the 1994 Microsoft Encarta: ``Ifa,b,care integers such thata=bc, a is called a multiple ofbor ofc, andborcis called a divisor or factor ofa. Ifcis not,bis called a proper divisor ofa. Even integers, which include 0, are multiples of 2, for example, -4, 0, 阅读全文
posted @ 2013-02-23 04:35 三人木君 阅读(350) 评论(0) 推荐(0) 编辑
摘要: Power CrisisDuring the power crisis in New Zealand this winter (caused by a shortage of rain and hence low levels in the hydro dams), a contingency scheme was developed to turn off the power to areas of the country in a systematic, totally fair, manner. The country was divided up intoNregions (Auckl 阅读全文
posted @ 2013-02-23 03:03 三人木君 阅读(361) 评论(0) 推荐(0) 编辑
摘要: CombinationsComputing the exact number of ways thatNthings can be takenMat a time can be a great challenge whenNand/orMbecome very large. Challenges are the stuff of contests. Therefore, you are to make just such a computation given the following:GIVEN:Compute theEXACTvalue of:You may assume that th 阅读全文
posted @ 2013-02-23 00:50 三人木君 阅读(185) 评论(0) 推荐(0) 编辑