title:
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
翻译:
通过列出前6个质数,我们可知第6个质数是13。
那么第10001个质数是...
分类:
其他好文 时间:
2014-06-05 12:28:28
阅读次数:
277
title:
The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence ...
分类:
其他好文 时间:
2014-06-05 12:03:29
阅读次数:
243
在lxc安装过程遇到的所有问题解决后,你可以创建你的第一个lxc容器了。最简单的方法使用lxc自带的创建文件系统的工具,当然你也可以自己做个文件系统。模板的安装路径一般放在/usr/local/share/lxc/templates#lxc-create -t centos -n centos-tst#lxc-start -n centos-tst...
分类:
其他好文 时间:
2014-06-05 09:38:02
阅读次数:
258
【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
观察者模式是最常用的设计模式之一,【对象之间多对一的依赖关系,当一个对象发生变化时,其会通知所有依赖它的对象】。拿订阅报纸和发行报社打比方,报社采集到news制作新的报纸,派送给订阅的客户,以此把最新的消息告知客户。所以,
出版社 + 订阅者 = 观察者模式。
这种一对多的关系,也即“一个”主题、“多个”观察者能够使得观察者仅仅了解主题推送的消息但不知晓其中的细节,而主题握有观察者列表...
分类:
其他好文 时间:
2014-06-02 23:33:05
阅读次数:
376
title:
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
1, 3, 6, 10,...
分类:
其他好文 时间:
2014-06-01 10:31:26
阅读次数:
233
第一章:前言
学习笔记,记录学习STL算法的一些个人所得,在以后想用的时候可以快速拾起。 第二章:明细 copy 函数原型: template OutputIterator
copy (InputIterator first, InputIterator last, OutputIterat...
分类:
其他好文 时间:
2014-05-31 04:08:50
阅读次数:
375
第一章:前言 数量不多,用到的时候会很爽。 第二章:明细 STL算法中的又一个分类:分割;将已有元素按照既定规则分割成两部分。 is_partitioned 函数原型: template
bool is_partitioned (InputIterator first, InputIterat...
分类:
其他好文 时间:
2014-05-31 03:19:43
阅读次数:
230
Jump Game IIGiven an array of non-negative
integers, you are initially positioned at the first index of the array.Each
element in the array represents...
分类:
其他好文 时间:
2014-05-31 03:14:14
阅读次数:
243