1)循环语句while,do/while,for
格式:while(布尔表达式){循环体语句}//先验循环,可执行0次或n次,若布尔表达式第一次为false,永不执行循环体语句
do{循环体语句}while(布尔表达式);//后验循环,可执行一次或n次,且至少执行一次 for(初始化;布尔表达式;变...
分类:
其他好文 时间:
2014-05-06 09:15:17
阅读次数:
254
今天有一同学在群上聊到一个比较好玩的题目(本人看书不多,后面才知是《C++模板元编程》第二章里面的一道习题),
我也抱着试一试的态度去完成它, 这道题也体现了c++模板元编程的基础和精髓: 类型就是数据。题目如下所述:Write a ternary
metafunctionreplace_typet...
分类:
其他好文 时间:
2014-05-06 00:27:15
阅读次数:
333
http://blog.sina.com.cn/s/blog_7a4cdec80100wkyh.html
分类:
其他好文 时间:
2014-05-05 23:53:37
阅读次数:
314
Link:http://oj.leetcode.com/problems/reverse-linked-list-ii/Reverse a linked
list from positionmton. Do it in-place and in one-pass.For example:Given1...
分类:
其他好文 时间:
2014-05-05 22:46:11
阅读次数:
411
The Bandulu Space Agency (BSA) has plans for
the following three space missions:Mission A: Landing on Ganymede, the largest
moon of Jupiter.Mission B:...
分类:
其他好文 时间:
2014-05-05 22:28:06
阅读次数:
565
Problem Description
Given an positive integer A (1
For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2.
Another example...
分类:
其他好文 时间:
2014-05-05 13:22:39
阅读次数:
394
Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets
so as the following conditions hold:
The product of all numbers in the first set is less ...
分类:
其他好文 时间:
2014-05-03 23:51:19
阅读次数:
621
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5176
Simple Equation
Time Limit: 2 Seconds Memory Limit: 65536 KB
There are many Equations. Some are difficu...
分类:
其他好文 时间:
2014-05-03 17:47:01
阅读次数:
343
Valera wanted to prepare a Codesecrof round. He's already got one problem and he wants to set a time limit (TL) on it.
Valera has written n correct solutions. For each correct solution, he knows it...
分类:
其他好文 时间:
2014-05-03 16:53:51
阅读次数:
364
VdcEye manager first version has been released, please read below document for using....
分类:
其他好文 时间:
2014-05-03 16:35:30
阅读次数:
397