http://acm.nyist.net/JudgeOnline/problem.php?pid=708状态转移方程的思路:对于一个数N,可以是N
- 1的状态+1 得到,另外,也可以是(n / 2) * (1 + 1)得到,同理对于任意的奇数p,都有如果n可以整除p,都有f(n / p) + f(...
分类:
其他好文 时间:
2014-04-30 21:26:26
阅读次数:
519
题目: Given a string, find the length of the longest
substring without repeating characters. For example, the longest substring
without repeating letter...
分类:
其他好文 时间:
2014-04-30 21:15:32
阅读次数:
511
istringstream: istringstream
对象可以绑定一行字符串,然后以空格为分隔符把该行分隔开来。创建对象:istringstream strsm("aa bb
c");//strsm>>astr;//string astrstrsm>>bstr;//string bstrcout...
分类:
编程语言 时间:
2014-04-30 21:14:06
阅读次数:
651
1.logger.debug("Debug ...")或logger.info("Info
...")或logger.warn("Warn ...")或logger.error("Error ...")
都只输出对应的信息,即logger.debug只输出debug的信息,info只输出info的信...
分类:
其他好文 时间:
2014-04-30 20:41:18
阅读次数:
704
This is a two player game. Initially there
areninteger numbers in an array and playersAandBget chance to take them
alternatively. Each player can take...
分类:
其他好文 时间:
2014-04-30 20:34:38
阅读次数:
519
控制器(Controller)如果没有特定的表/模型关联的话,哪怕建测试都会出错,但你可以加一行到控制器(Controller)里就好了public
$uses=array(); 或者 public $uses=false;2.4以上版本的好像默认可以支持了
分类:
Web程序 时间:
2014-04-30 20:29:17
阅读次数:
407
JavaScript 中一共有 5 种基本类型,分别是
String、Number、Boolean、Null 和 Undefined 。前 3 种都比较好理解,后面两种就稍微复杂一点。 Null 类型只有一个值,就是
null ; Undefined 类型也只有一个值,即 undefined 。 n...
分类:
其他好文 时间:
2014-04-29 11:43:47
阅读次数:
484
DateTime.Now.ToString("{0:yyyy-MM-dd HH:mm:ss}");
//返回string类型string.Format("{0:yyyy-MM-dd HH:mm:ss}",DateTime.Now);
分类:
其他好文 时间:
2014-04-29 11:42:47
阅读次数:
408
String[] strs = {"string--01", "string--02",
"string--03", "string--04"};List strsList =
Arrays.asList(strs);//以下语句输出:[string--01, string--02, string-...
分类:
其他好文 时间:
2014-04-29 11:33:45
阅读次数:
345
String field;@Testpublic void test01() { String a =
"aaa"; String b = "aaa"; String c = new String("aaa"); String d = new
String("aaa"); System.out.pr...
分类:
编程语言 时间:
2014-04-29 11:28:46
阅读次数:
391