摘要: 第一种形式是 publicclassSingleton{ privateSingleton(){} privatestaticfinalSingletoninstance=newSingleton(); publicstaticSingletonget... 阅读全文
posted @ 2016-01-27 13:01 Hygeia 阅读(410) 评论(0) 推荐(0) 编辑
摘要: he partition of an integer is a way of writing it as a sum of positive integers. For example, the partitions of the number 5 are:54+13+22+2+12+1+1+11+... 阅读全文
posted @ 2016-01-27 12:59 Hygeia 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Implement the integral part logn base 2 with bit manipulationsint integralPartOfLog(unsigned int n){ int ret = 0; while (n > 0) { n =... 阅读全文
posted @ 2016-01-27 11:31 Hygeia 阅读(198) 评论(0) 推荐(0) 编辑
摘要: /* In "the 100 game," two players take turns adding, to a runningtotal, any integer from 1..10. The player who first causes the runningtotal to reach ... 阅读全文
posted @ 2016-01-27 11:03 Hygeia 阅读(265) 评论(0) 推荐(0) 编辑