关系式:
C( n, m ) = C( n - 1, m - 1 ) + C( n - 1, m ) PS: C( n, 0 ) = 1, C( 0, n ) = 0
C( n, m ) = ( n / m ) * C( n - 1, m - 1 )
(counting two ways)
C( n, i ) * C( i , m ) = C( n, m ) * C( n -...
分类:
其他好文 时间:
2014-10-03 01:10:43
阅读次数:
412
在项目交付时如果需要编写数据字典,可以采用下面的方法,首先运行线面的sql语句
SELECT A.TABLE_NAME AS 表名,
A.COLUMN_NAME AS 字段名,
DECODE(A.CHAR_LENGTH,
0,
DECODE(A.DATA_SCALE,
N...
分类:
数据库 时间:
2014-09-29 17:10:01
阅读次数:
237
在页面的url中使用encodeURI(encodeURI(中文)),对中文进行编码,并在服务器的java程序中使用URLDecoder.decode(中文, "UTF-8")进行解码即可;...
分类:
Web程序 时间:
2014-09-29 14:33:31
阅读次数:
179
You seem to be confusing/merging two different concepts together. We start of talking about encrypting traffic (HTTPS) and then we start talking about different ways to manage authenticated session...
分类:
移动开发 时间:
2014-09-29 02:50:48
阅读次数:
345
题目:
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?
很简单的思路,因为一次可以走1~2步,所以...
分类:
其他好文 时间:
2014-09-29 00:34:46
阅读次数:
272
这题乍一看有点像Decode Ways ,实际上是一个深搜+剪枝的题目
也可以通过三个for循环寻找可行的‘.’的位置
递归方法如下:
vector restoreIpAddresses(string s) {
vector res;
restore(s, 0, 0, res, "");
return res;
}
...
分类:
其他好文 时间:
2014-09-27 02:11:09
阅读次数:
199
题目:求将数字字符串s转换成字母有多少种可能的结果?
dp(i):s[0...i-1]可能的结果数。我们设si = i-1
分析s[si]:
1. s[si - 1] = '1' || s[si - 1] = '2' && s[si] = '6'
s[0...si]可以转换成s[si]对应的字母 + s[0...si-1]对应的字母,也可能是 s[si-1..si]对应的字母 + s[0....
分类:
其他好文 时间:
2014-09-27 00:48:08
阅读次数:
206
How many ways
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2957 Accepted Submission(s): 1733
Problem Description
这是一个简单的生存游戏,...
分类:
其他好文 时间:
2014-09-26 13:26:48
阅读次数:
316
Leetcode 经典题Decode Ways 容易误入错误思路...
分类:
其他好文 时间:
2014-09-25 21:12:28
阅读次数:
159
setuptools,pip,install,UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte.原因和解决方案 http://blog.csdn.net/hugleecool/article/details/17996993#...
分类:
其他好文 时间:
2014-09-25 20:13:58
阅读次数:
248