2013年2月22日
摘要: 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-22 20:33 LOVE小熊ing 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Problem D: Above AverageIt 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 th 阅读全文
posted @ 2013-02-22 20:26 LOVE小熊ing 阅读(199) 评论(0) 推荐(0) 编辑
  2013年2月21日
摘要: Odd SumGiven a range[a,b], you are to find the summation of all the odd integers in this range. For example, the summation of all the odd integers in the range[3, 9]is3 + 5 + 7 + 9 = 24.InputThere can be at multiple test cases. The first line of input gives you the number of test cases,T(1T100). The 阅读全文
posted @ 2013-02-21 11:39 LOVE小熊ing 阅读(191) 评论(0) 推荐(0) 编辑
  2013年2月20日
摘要: Word ScrambleWrite a program that will reverse the letters in each of a sequence of words while preserving the order of the words themselves.InputThe input file will consist of several lines of several words. Words are contiguous stretches of printable characters delimited by white space.OutputThe o 阅读全文
posted @ 2013-02-20 18:29 LOVE小熊ing 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Triangle WaveIn this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.Input and OutputThe input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This lin 阅读全文
posted @ 2013-02-20 18:27 LOVE小熊ing 阅读(206) 评论(0) 推荐(0) 编辑
  2013年2月19日
摘要: 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-19 12:16 LOVE小熊ing 阅读(127) 评论(0) 推荐(0) 编辑
  2013年2月17日
摘要: Relational Operators Input:Standard InputOutput:Standard OutputSomeoperatorschecks about the relationship between two values and these operators are called relational operators. Given two numerical values your job is just to find out the relationship between them that is (i) First one is greater tha 阅读全文
posted @ 2013-02-17 23:53 LOVE小熊ing 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Power of CryptographyBackgroundCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo functions of these primes. Work in this area has resulted in the practical use of results from number theory and other branches of mathematics once con 阅读全文
posted @ 2013-02-17 23:24 LOVE小熊ing 阅读(156) 评论(0) 推荐(0) 编辑
  2013年2月15日
摘要: Problem E: Jolly JumpersA sequence ofn > 0integers is called ajolly jumperif the absolute values of the difference between successive elements take on all the values 1 throughn-1. For instance,1 4 2 3is a jolly jumper, because the absolutes differences are 3, 2, and 1 respectively. The definition 阅读全文
posted @ 2013-02-15 23:13 LOVE小熊ing 阅读(185) 评论(0) 推荐(0) 编辑
  2013年2月8日
摘要: TeX QuotesTeX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use `` and " to delimit quotations, rather than the mundane"which is what is provided by m 阅读全文
posted @ 2013-02-08 12:43 LOVE小熊ing 阅读(211) 评论(0) 推荐(0) 编辑