Constructing Roads
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 18744
Accepted: 7755
Description
There are N villages, which are numbered from 1 to N, and...
分类:
其他好文 时间:
2014-07-22 23:02:33
阅读次数:
221
这道题在前两个的基础上做稍微改进就可以。下面是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
Factorial Problem in Base K
Time Limit: 2 Seconds Memory Limit: 65536 KB
How many zeros are there in the end of s! if both s and s! are written in base k which is not necessarily to be 10...
分类:
其他好文 时间:
2014-05-02 20:11:29
阅读次数:
376
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
Okay for centos 6.4 also On apu.0xdata.loc,
after this install was done$ which python /usr/local/bin/python$ python -VPython
2.7.3$ ls -ltr /usr/local...
分类:
编程语言 时间:
2014-05-02 12:53:59
阅读次数:
609
这道题,采用动态规划算法。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
Given a binary tree, determine if it is
height-balanced.For this problem, a height-balanced binary tree is defined as a
binary tree in which the depth...
分类:
其他好文 时间:
2014-05-02 07:05:08
阅读次数:
311
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
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-05-02 00:37:20
阅读次数:
349
妈咪,我找到了! -- 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