这道题在前两个的基础上做稍微改进就可以。下面是AC代码: 1 /** 2 * Design an
algorithm to find the maximum profit. You may complete at most two transactions.
3 * @pa...
分类:
其他好文 时间:
2014-07-22 23:01:13
阅读次数:
251
Permutation p is
an ordered set of integers p1,??p2,??...,??pn,
consisting of n distinct positive integers, each of them doesn't exceed n.
We'll denote the i-th element of permutation p as pi.
...
分类:
其他好文 时间:
2014-07-22 23:00:15
阅读次数:
312
1. 自定义验证--成功提示
1) 添加选项
errorClass: "unchecked",
validClass: "checked",
errorElement: "span",
errorPlacement: function (error, element) {
if (element.parent().find("span[for=""" + element.attr("id...
分类:
Web程序 时间:
2014-05-02 18:38:21
阅读次数:
467
这道题,采用动态规划算法。from top to
down,把到每个节点的最小路径和都求出来。下面是AC代码: 1 /** 2 * Given a triangle, find the minimum path
sum from top to bottom. 3 * Each ...
分类:
其他好文 时间:
2014-05-02 12:19:23
阅读次数:
382
join函数利用字符将数组中的元素分割开.[root@localhost~]#find`perl-e‘@array=join("","@INC");print"@array";‘`-name*.pm|wc-l547这个例子是利用空格分开了要查找的路径,然后find可以查找所有的路径下匹配*.pm的文件,我一共查到了547个模块.
分类:
系统相关 时间:
2014-05-02 04:13:56
阅读次数:
311
说在前面:首先说一下两者之间的区别,假设当前元素为element,mouseover事件具有冒泡特性,也就是说无论鼠标是从别的元素移动到element或者是从element的子元素移动到element都会触发mouseover事件。对于mouseenter事件,该事件没有冒泡特性,也就是说只有鼠标穿...
分类:
Web程序 时间:
2014-05-01 21:13:12
阅读次数:
390
Requirement-Driven Linux Shell
ProgrammingRequirement-Driven Linux Shell ProgrammingTable of Contents1. Where
can I find the basic Material about Linu...
分类:
系统相关 时间:
2014-05-01 20:40:05
阅读次数:
678
1
/******************************************************************** 2 created:
2014/04/29 11:35 3 filename: nth_element.cpp 4 author: ...
分类:
其他好文 时间:
2014-05-01 20:08:30
阅读次数:
404
题目: Given a string S, find the longest palindromic
substring in S. You may assume that the maximum length of S is 1000, and there
exists one unique lo...
分类:
其他好文 时间:
2014-05-01 20:07:13
阅读次数:
429
妈咪,我找到了! -- 15个实用的Linux
find命令示例http://www.oschina.net/translate/15-practical-linux-find-command-examples?p=2#comments爹地,我找到了!
-- 15个极好的Linux find命令示例...
分类:
系统相关 时间:
2014-05-01 19:41:30
阅读次数:
429