上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this pr... 阅读全文
posted @ 2014-07-14 16:10 冷夏的博客园 阅读(202) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two d... 阅读全文
posted @ 2014-07-14 16:03 冷夏的博客园 阅读(351) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) t... 阅读全文
posted @ 2014-07-14 16:03 冷夏的博客园 阅读(240) 评论(0) 推荐(0) 编辑
摘要: DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus – Yanyuan. Students i... 阅读全文
posted @ 2014-07-14 16:01 冷夏的博客园 阅读(295) 评论(0) 推荐(0) 编辑
摘要: DescriptionBill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunate... 阅读全文
posted @ 2014-07-14 15:57 冷夏的博客园 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Description题目描述:大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述:给出某个排列,求出这个排列的下k个排列,如果遇到最后一个... 阅读全文
posted @ 2014-07-14 15:53 冷夏的博客园 阅读(219) 评论(0) 推荐(0) 编辑
摘要: DescriptionUgly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the first 10 ugly n... 阅读全文
posted @ 2014-07-14 15:51 冷夏的博客园 阅读(398) 评论(0) 推荐(0) 编辑
摘要: DescriptionWrite a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the inpu... 阅读全文
posted @ 2014-07-14 15:46 冷夏的博客园 阅读(247) 评论(0) 推荐(0) 编辑
摘要: DescriptionIf a and d are relatively prime positive integers, the arithmetic sequence beginning witha and increasing by d, i.e., a, a + d,a + 2d, a + ... 阅读全文
posted @ 2014-07-14 15:45 冷夏的博客园 阅读(260) 评论(0) 推荐(0) 编辑
摘要: DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum... 阅读全文
posted @ 2014-07-14 15:44 冷夏的博客园 阅读(185) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页