09 2014 档案

摘要:1001. Fibonacci 2DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn-1 + Fn-2 for n ≥ 2. For examp... 阅读全文
posted @ 2014-09-27 20:50 厕所门口~~ 阅读(518) 评论(0) 推荐(0) 编辑
摘要:1051. Biker's Trip OdometeTime Limit: 1sec Memory Limit:32MBDescriptionMost bicycle speedometers work by using a Hall... 阅读全文
posted @ 2014-09-27 17:48 厕所门口~~ 阅读(189) 评论(0) 推荐(0) 编辑
摘要:1046. Plane SpottingTime Limit: 1sec Memory Limit:32MBDescriptionCraig is fond of planes. Making photographs of plane... 阅读全文
posted @ 2014-09-27 17:32 厕所门口~~ 阅读(206) 评论(0) 推荐(0) 编辑
摘要:DescriptionDNA (Deoxyribonucleic acid) is founded in every living creature as the storage medium for genetic information. It is comprised of subunits ... 阅读全文
posted @ 2014-09-27 15:22 厕所门口~~ 阅读(256) 评论(0) 推荐(0) 编辑
摘要:我们都知道,如果在一个函数调用另一个函数,假设是 main 函数调用 fun 函数,这个 fun 函数返回一个临时类类型变量,那么这个时候编译器就会在 main 函数申请一个空间并生成一个临时对象,通过拷贝构造函数将 fun 返回的临时变量的值拷贝到这个临时对象。我们看如下的代码:#include ... 阅读全文
posted @ 2014-09-24 21:38 厕所门口~~ 阅读(1208) 评论(0) 推荐(0) 编辑
摘要:DescriptionLong long ago, there was a super computer that could deal with VeryLongIntegers(no VeryLongInteger will be negative). Do you know how this ... 阅读全文
posted @ 2014-09-23 20:56 厕所门口~~ 阅读(207) 评论(0) 推荐(0) 编辑
摘要:在 c++ primer 5 中在说到string的章节里面有这样一句话:string s5 = "hiya"; // copy initialization也就是说,这里说上面这句是拷贝初始化,也就是调用拷贝构造函数。而下面这句:string s6("hiya"); // direct init... 阅读全文
posted @ 2014-09-20 18:55 厕所门口~~ 阅读(1316) 评论(0) 推荐(0) 编辑
摘要:const 引用: 在初始化常量引用时,允许用任意表达式作为初始值,只要该表达式的结果能转换成引用的类型即可。尤其,允许为一个常量引用绑定非常量的对象、字面值,甚至是一个表达式。我们来看 const 引用的分析:#include int main(int argc, char* argv[]){ ... 阅读全文
posted @ 2014-09-18 15:28 厕所门口~~ 阅读(224) 评论(0) 推荐(0) 编辑
摘要:在一般教材里面,我们会说引用是变量的别名,另外在 c++ primer 5里面说到引用的时候,说引用不是对象,不能对它进行取地址。但是我们来看看下面代码的分析: 1 #include 2 3 int main(int argc, char* argv[]) 4 { 5 int i = ... 阅读全文
posted @ 2014-09-18 11:31 厕所门口~~ 阅读(188) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示