Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
分类:
其他好文 时间:
2014-06-27 23:02:33
阅读次数:
258
Given a triangle, find the minimum path sum from top to bottom. Each step you maymove to adjacent numbers on the row below.For example, given the fol....
分类:
其他好文 时间:
2014-06-27 16:29:58
阅读次数:
188
Div + CSS Example, Wayhome's Blog position: absolute; top: 5px; right: 20px; position: absolute; left: 20px; bottom: 10px; ...
分类:
Web程序 时间:
2014-06-26 20:28:58
阅读次数:
297
A bottom-up DP. To be honest, it is not easy to relate DP to this problem. Maybe, all "most"\"least" problems can be solved using DP..Reference:http:/...
分类:
Web程序 时间:
2014-06-25 18:39:32
阅读次数:
235
本题分两步:
1 使用Tarjan算法求所有最大子强连通图,并且标志出来
2 然后遍历这些节点看是否有出射的边,没有的顶点所在的子强连通图的所有点,都是解集。
Tarjan算法就是模板算法了。
这里使用一个数组和一个标识号,就可以记录这个顶点是属于哪个子强连通图的了。
然后使用DFS递归搜索所有点及其边,如果有边的另一个顶点不属于本子强连通图,那么就说明有出射的边。
有难度的题目:
...
分类:
其他好文 时间:
2014-06-25 07:19:31
阅读次数:
241
使用JavaAWT类可以很方便取得屏幕分辨率及可用屏幕大校01.DimensionscrSize=Toolkit.getDefaultToolkit().getScreenSize();此语句可取得屏幕实际大校如屏幕分辨率是1024*768时,scrSize.width的值为1024,scrSize.height的值为768。01.InsetsscrInsets=Toolkit.getDefaultToolk..
分类:
编程语言 时间:
2014-06-25 06:08:13
阅读次数:
270
使用JavaAWT类可以很方便取得屏幕分辨率及可用屏幕大校01.DimensionscrSize=Toolkit.getDefaultToolkit().getScreenSize();此语句可取得屏幕实际大校如屏幕分辨率是1024*768时,scrSize.width的值为1024,scrSize.height的值为768。01.InsetsscrInsets=Toolkit.getDefaultToolk..
分类:
编程语言 时间:
2014-06-25 06:00:28
阅读次数:
210
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-06-24 18:56:54
阅读次数:
240
Given a triangle, find the minimum path sum from top to bottom. Each step you may
move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],...
分类:
其他好文 时间:
2014-06-22 17:07:52
阅读次数:
166
关于这个题想说一下,刚开始准备按照有一个含有n个数的非递减序列,每个数最大值为m,数字可以重复,有多少种这样的序列,像是一个蛮复杂的排列组合
其实这道题,从left bottom到right up只能向右或者向上,也就是m+n个格子里面取m个格子写右,n个格子写上,就成了个很2的排列组合问题
值得强调的是,这个题求组合数是用分数相乘来求的,怕double丢精度可以末尾+0.5然后转化为long...
分类:
其他好文 时间:
2014-06-22 16:53:21
阅读次数:
135