摘要: One of the famous proofs of modern mathematics is Georg Cantor's demonstration that the set of rational numbers is enumerable. The proof works by using an explicit enumeration of rational numbers as shown in the diagram below.In the above diagram, the first term is 1/1, the second term is 1/2, t 阅读全文
posted @ 2013-03-03 16:59 WingWing111 阅读(134) 评论(0) 推荐(0) 编辑
摘要: In millions of newspapers across the United States there is a word game calledJumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the answer it is necessary to unscramble four words. Your task is to write a program that can unscramble words.InputThe 阅读全文
posted @ 2013-03-03 03:48 WingWing111 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Children are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the "carry" operation - in which a 1 is carried from one digit position to be added to the next - to be a significant challenge. Your job is to count the number of carry operations for each of 阅读全文
posted @ 2013-03-03 03:13 WingWing111 阅读(154) 评论(0) 推荐(0) 编辑
摘要: A character string is said to have periodkif it can be formed by concatenating one or more repetitions of another string of lengthk. For example, the string "abcabcabcabc" has period 3, since it is formed by 4 repetitions of the string "abc". It also has periods 6 (two repetition 阅读全文
posted @ 2013-03-03 03:08 WingWing111 阅读(316) 评论(0) 推荐(0) 编辑
摘要: TeX 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 most keyboa 阅读全文
posted @ 2013-03-03 03:00 WingWing111 阅读(144) 评论(0) 推荐(0) 编辑
摘要: A common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as "K" and so on. You are to decode a message typed in this manner.Input consists of several lines of text. Each l 阅读全文
posted @ 2013-03-03 02:57 WingWing111 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1 Root your phone2 adb shell3 su4 chmod -R 777 /data5 Go to DDMS view in Eclipse 阅读全文
posted @ 2013-03-01 16:12 WingWing111 阅读(780) 评论(0) 推荐(0) 编辑
摘要: A biologist is experimenting with DNA modification of bacterial colonies being grown in a linear array of culture dishes. By changing the DNA, he is able ``program" the bacteria to respond to the population density of the neighboring dishes. Population is measured on a four point scale (from 0 阅读全文
posted @ 2013-03-01 04:39 WingWing111 阅读(229) 评论(0) 推荐(0) 编辑
摘要: An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive integerAas the first item in the sequence.Step 2:IfA= 1 then stop.Step 3:IfAis even, then replaceAbyA/ 2 and go to step 2.Step 4:IfAis odd, then replaceAby 3 *A+ 1 and 阅读全文
posted @ 2013-03-01 03:48 WingWing111 阅读(108) 评论(0) 推荐(0) 编辑
摘要: In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are the same as the classic game of hangman, and are given as follows:The contestant tries to solve to puzzle by guessing one 阅读全文
posted @ 2013-03-01 03:15 WingWing111 阅读(143) 评论(0) 推荐(0) 编辑