Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-06-26 00:29:49
阅读次数:
168
For a period before the recent nationwide gold industry shutdown, Duration was Zimbabwe’s second largest gold producer. Up until that point, it had en...
分类:
其他好文 时间:
2014-06-25 23:20:27
阅读次数:
274
简直难到没朋友。
双向bfs + 剪枝。
剪枝策略:
对于2--5位置上的数,只有当光标在对应位置时通过swap ,up,down来改变,那么当当前位置没有达到目标状态时,left和right无意义。
好了,只剪掉这里就过掉了。。。
还有比较炫酷的方法实现枚举720种排列。。。然后状压什么的。。。功力不够完全看不懂。。。。
#include
#include
#include
#...
分类:
其他好文 时间:
2014-06-25 20:11:00
阅读次数:
162
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
//父页面调用子页面Add函数$("iframe").contentWindow.Add()//父页面对子页面Id为Sava的Dom元素执行一次单击操作$("iframe").contents().find("#Sava").click();//子页面调用父页面Update()函数parent.Up...
分类:
Web程序 时间:
2014-06-24 21:36:54
阅读次数:
172
HTML(Hyper TextMark-up Language超文本标记语言)的缩写,标记:就是用来描述网页内容的一些特定符号。HTML不是编程语言,而是一种描述性的标记语言,用于描述网页中内容的显示方式,比如文字的颜色、大小,控件的大小等都能用HTML标记来实现。...
分类:
Web程序 时间:
2014-06-24 21:30:16
阅读次数:
312
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum...
分类:
其他好文 时间:
2014-06-22 20:59:24
阅读次数:
227
关于这个题想说一下,刚开始准备按照有一个含有n个数的非递减序列,每个数最大值为m,数字可以重复,有多少种这样的序列,像是一个蛮复杂的排列组合
其实这道题,从left bottom到right up只能向右或者向上,也就是m+n个格子里面取m个格子写右,n个格子写上,就成了个很2的排列组合问题
值得强调的是,这个题求组合数是用分数相乘来求的,怕double丢精度可以末尾+0.5然后转化为long...
分类:
其他好文 时间:
2014-06-22 16:53:21
阅读次数:
135
CCache is a compiler cache for C/C++. It speeds up recompilation by caching the result of previous compilations and detecting
when the same compilation is being done again. We can use this tool to s...
分类:
移动开发 时间:
2014-06-21 21:13:40
阅读次数:
318