简直难到没朋友。
双向bfs + 剪枝。
剪枝策略:
对于2--5位置上的数,只有当光标在对应位置时通过swap ,up,down来改变,那么当当前位置没有达到目标状态时,left和right无意义。
好了,只剪掉这里就过掉了。。。
还有比较炫酷的方法实现枚举720种排列。。。然后状压什么的。。。功力不够完全看不懂。。。。
#include
#include
#include
#...
分类:
其他好文 时间:
2014-06-25 20:11:00
阅读次数:
162
错误报告: error_reporting(E_ALL);字符串: addslashes(); stripslashes(); trim(); ltrim(); rtirm(); explode(); implode()或join(); echo(); htmlspecialchars(...
分类:
Web程序 时间:
2014-06-25 19:02:09
阅读次数:
247
Join 的实现原理在MySQL 中,只有一种Join 算法,也就是Nested Loop Join,没有其他很多数据库所提供的Hash Join,也没有Sort Merge Join。顾名思义,Nested Loop Join 实际上就是通过驱动表的结果集作为循环基础数据,然后一条一条的通过该结果...
分类:
数据库 时间:
2014-06-25 18:56:41
阅读次数:
249
/** * 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
mssql 子查询更新update log set uin= b.uinfrom log a,logs bwhere a.accountuin = b.accountuinmysql 不支持 update 子查询更新找了半天资料 终于搞定了...update `log` a inner join `...
分类:
数据库 时间:
2014-06-25 14:23:55
阅读次数:
271
收敛性$\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
1、查询的语句:
select a.id,b.name,a.*,b.* from syscomments a
join sysobjects b on a.id=b.id
where b.xtype='P' and a.text like '%usp_cm%'
b.xtype='P'指定在什么类型的范围进行搜索
‘%usp_cm%’就是你能记得的存储过程中的内容。
2、查找类型:
s...
分类:
数据库 时间:
2014-06-24 17:12:07
阅读次数:
256