昨天写 Scala 的时候,使用 match(相当于 switch)时,运行结果很奇怪。var i: Int = 0while (i println("offset: " + items(i)) case logSize => println("logSize: " + items(i)) c...
分类:
其他好文 时间:
2014-07-31 12:11:36
阅读次数:
219
Cube Stacking
Time Limit: 2000MS
Memory Limit: 30000K
Total Submissions: 18858
Accepted: 6547
Case Time Limit: 1000MS
Description
Farmer John and Betsy are playi...
分类:
其他好文 时间:
2014-07-31 09:52:16
阅读次数:
214
基础语句 #region switch case // int Number=char.Parse(Console.ReadLine()); // switch (Number) //{ // case 1: // Console.WriteLine("1"); // break; /...
分类:
其他好文 时间:
2014-07-31 09:48:06
阅读次数:
305
Just corner case..class Solution {public: ListNode *reverseBetween(ListNode *head, int m, int n) { if(m == n) return head; ListNode *...
分类:
其他好文 时间:
2014-07-31 09:34:05
阅读次数:
245
//参数过滤$sVariablesOrder=ini_get(‘variables_order‘);$request=array();//过滤不安全数据for($i=0;$i<strlen($sVariablesOrder);$i++){$cVariableFlat=strtolower($sVariablesOrder[$i]);switch($cVariableFlat){case‘e‘:$filtered=filter_input_array(INPUT_ENV,FILTER..
分类:
Web程序 时间:
2014-07-31 03:14:16
阅读次数:
275
问题描述:
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
解题思路:
这是一个典型的斐波那契数列,对于...
分类:
其他好文 时间:
2014-07-31 00:02:55
阅读次数:
243
题目描述 Give you a lot of positive integers, just to find out how many prime numbers there are.. In each case, there is an integer N representing the num...
分类:
其他好文 时间:
2014-07-30 23:35:35
阅读次数:
300
对于web系统的自动化测试,selenium使用比较多,它支持多种语言java、python、C#等,本文中使用java。selenium执行case时,支持截图,代码如下: File?file?=??((TakesScreenshot)driver).getScreenshotAs(O...
分类:
其他好文 时间:
2014-07-30 21:02:14
阅读次数:
311
测试的用例中,因为limit的大小不同,而产生了完全不同的执行计划:1. 测试case: create table t1 ( f1 int(11) not null, f2 int(11) not null, f3 int(11) not null, f4 tinyint(1) not n...
分类:
数据库 时间:
2014-07-30 17:18:24
阅读次数:
316
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1325
这题与HDU1272 小希的迷宫 (并查集) 非常像,不过细细看,还是有一点区别的。
就是这题的路径是单向的,每次只能由起点指向终点,在连接之前终点必须是根节点。
注意的问题:
1、不能成环,即每次输入的两个数的根节点不能相同;
2、最终根节点数目为一
3、注意当只输入“0 0” 时要输出”Case %d is a tree.“
4、路径是单向的,即每次只能由起点指向终点,在连接之前终点必须是根节点。...
分类:
其他好文 时间:
2014-07-30 12:20:33
阅读次数:
221