上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: DescriptionYou are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digi... 阅读全文
posted @ 2014-11-17 21:58 厕所门口~~ 阅读(332) 评论(0) 推荐(0) 编辑
摘要: DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given pos... 阅读全文
posted @ 2014-11-17 21:38 厕所门口~~ 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 在看《Linux多线程服务端编程:使用muduo C++网络库》 的时候,在说到如何防止在将对象的 this 指针作为返回值返回给了调用者时可能会造成的 core dump。需使用enable_share_from_this。 首先要说明的一个问题是如何安全地将 this 指针返回给调用者。一般来... 阅读全文
posted @ 2014-11-15 18:09 厕所门口~~ 阅读(1622) 评论(0) 推荐(0) 编辑
摘要: 在mac10.10上使用octave的时候,键入 plot(x, y)的时候会出现如下错误:set terminal aqua enhanced title "Figure 1" font "*,6" dashlength 1 ^ line 0: unknown or ambiguous ter... 阅读全文
posted @ 2014-11-09 18:37 厕所门口~~ 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: DescriptionOne very simple type of solitaire game known as "Hit or Miss" (also known as "Frustration," "Harvest," "Roll-Call," "Talkative", and "Treiz... 阅读全文
posted @ 2014-11-09 11:29 厕所门口~~ 阅读(460) 评论(0) 推荐(0) 编辑
摘要: /* 动态规划和分治法相似,都是通过组合子问题的解来求解原问题。 但分治法是将问题划分为互不相交的子问题,递归地求解子问题,再将它们的解组合起来,求出原问题的解。与之相反,动态规划应用于子问题重叠的情况,即不同的子问题具有公共的子问题。在这种情况下,分治法会做很多不必要的工作。 动态规划... 阅读全文
posted @ 2014-11-03 01:08 厕所门口~~ 阅读(285) 评论(0) 推荐(0) 编辑
摘要: /*------------------ 求解最大子数组问题 --------------- 最大子数组,就是求解一个数组的所有元素的各种组合中,和最大的那个子数组。在这种情况下,如果元素值全部非负,那么最大子数组当然是所有元素。但是如果有负值的元素存在,那么久需要找到一个由数组中连续几个... 阅读全文
posted @ 2014-11-02 19:55 厕所门口~~ 阅读(828) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1sec Memory Limit:32MBDescriptionJohn is moving to the penthouse of a tall sky-scraper. He packed all his stuff in boxes and drove them t... 阅读全文
posted @ 2014-11-01 20:13 厕所门口~~ 阅读(381) 评论(0) 推荐(0) 编辑
摘要: DescriptionJill has been investing in a mutual fund for a while. Since her income has varied, the amount of money she has added to the investment has ... 阅读全文
posted @ 2014-11-01 18:11 厕所门口~~ 阅读(213) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn the field of computer science, forest is important and deeply researched , it is a model for many data structures . Now it’s your job he... 阅读全文
posted @ 2014-10-26 14:38 厕所门口~~ 阅读(534) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页