简直难到没朋友。
双向bfs + 剪枝。
剪枝策略:
对于2--5位置上的数,只有当光标在对应位置时通过swap ,up,down来改变,那么当当前位置没有达到目标状态时,left和right无意义。
好了,只剪掉这里就过掉了。。。
还有比较炫酷的方法实现枚举720种排列。。。然后状压什么的。。。功力不够完全看不懂。。。。
#include
#include
#include
#...
分类:
其他好文 时间:
2014-06-25 20:11:00
阅读次数:
162
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:
其他好文 时间:
2014-06-25 18:42:46
阅读次数:
172
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:
其他好文 时间:
2014-06-25 18:40:08
阅读次数:
182
Unity 使用的是左手坐标系物体旋转:通常围绕一条射线进行旋转(点确定线的位置,射线确定线的方向)。旋转角度:朝射线的方向看过去,逆时针旋转。围绕自己的坐标轴旋转:transform.Rotate (Vector3.right, 50 * Time.deltaTime);围绕世界坐标轴旋转,注意,...
分类:
其他好文 时间:
2014-06-25 16:24:15
阅读次数:
383
收敛性$\bf命题:$连续性$\bf命题:$稠密性$\bf命题:$设$E$为度量空间$X$中的点集,则$E$在$X$中稠密的充要条件是对任意的$x \in X$,存在点列$\left\{ {{x_n}} \right\} \subset E$,使得${x_n} \to x\left( {n \to ...
分类:
其他好文 时间:
2014-06-25 13:21:44
阅读次数:
317
基本理论$\bf(Egoroff定理)$设$E$为测度有限的可测集,${f_n}\left( x \right)$为$E$上的可测函数列.若${f_n}\left( x \right)$在$E$上几乎处处收敛于$f(x)$,则对任给的$\delta > 0$,存在${E_\delta } \subs...
分类:
其他好文 时间:
2014-06-25 13:17:54
阅读次数:
197
证明:令$d = \mathop {inf}\limits_{y \in M} \left\| {x - y} \right\|$,由下确界的定义知,存在${x_n} \in M$,使得\[\mathop {\lim }\limits_{n \to \infty } \left\| {{x_n} -...
分类:
其他好文 时间:
2014-06-25 13:12:36
阅读次数:
263
证明:令$d = \mathop {inf}\limits_{y \in M} \left\| {x - y} \right\|$,由下确界的定义知,存在${x_n} \in M$,使得\[\mathop {\lim }\limits_{n \to \infty } \left\| {{x_n} -...
分类:
其他好文 时间:
2014-06-25 09:39:09
阅读次数:
263
CSS样式表在Firefox和IE下的区别 总结的一些CSS在FF和IE下的区别!可能不完整,以后会陆续补充。 FireFox: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行 FireFox: body 设置 text-align 时,.....
分类:
其他好文 时间:
2014-06-24 22:03:52
阅读次数:
230
Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->...
分类:
其他好文 时间:
2014-06-24 12:00:32
阅读次数:
142