//avl_tree.h
#include
using std::stack;
template
class AVL_TREE
{
public:
AVL_TREE(){
nil = new AVL_NODE(0, -1, NULL, NULL);
tree_root = nil;
}
bool find(const T &val) const;
void insert(co...
分类:
其他好文 时间:
2014-09-16 23:44:51
阅读次数:
272
点击打开链接
SPFA + A*
#include
#include
#include
#include
using namespace std;
struct node {
int v, dis, f, next;
friend bool operator b.f;
}
};
const in...
分类:
其他好文 时间:
2014-09-16 23:44:21
阅读次数:
189
链表是一种基础数据结构,它是集合类的抽象数据结构类型中表示数据的合适类型。与数字结构不同之处在于,在链表中插入元素和删除元素都更加方便。定义:链表表示的一列元素,由一系列的节点(Node)构成,是一种递归数据结构。节点是一个能够包含任何类型数据的抽象实体,它所包含的指向节点的应用体现了他在链表中的作...
分类:
其他好文 时间:
2014-09-16 22:04:11
阅读次数:
216
当维护的机器很多时,有时需要批量部署。 一、什么样的情形需要批量部署 1、操作系统的安装 常见的有collber,red hat satelite(redhat系统专用)。 2、操作系统的配置 常见的有cfengine,puppet,chef,func。其中puppet最受欢迎 3、批量程序的部署 ...
分类:
其他好文 时间:
2014-09-16 21:46:01
阅读次数:
511
判断俩个链表是否相交给出俩个单向链表的头指针,比如h1,h2,判断这俩个链表是否相交。为了简化问题,我们假设俩个链表均不带环。问题扩展:1.如果链表可能有环列?2.如果需要求出俩个链表相交的第一个节点列?ANSWER:struct Node { int data; int Node *next;};...
分类:
其他好文 时间:
2014-09-16 20:34:30
阅读次数:
172
实验环境:两台主机:centos6.5+httpd2.4+php5.5组成web的基本环境,并且web页面访问正常,并且确保httpd24服务不会开机启动。node1.mylinux.com10.204.80.79node2.mylinux.com10.204.80.80我这里启用ansible来方便对两个节点的管理,启用一台主机做为管理节点,IP:10.204.80...
分类:
Web程序 时间:
2014-09-16 19:08:45
阅读次数:
412
终于搞定了单点修改线段树。。。3个月。。操蛋。。根本没有模板题。。觉得太弱了。。。艹蛋。。。必须进一步更新我的版本啊#include#include#include#includeusing namespace std;struct node{ int left,right,value;};n...
分类:
其他好文 时间:
2014-09-16 18:55:00
阅读次数:
149
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le...
分类:
编程语言 时间:
2014-09-16 18:48:00
阅读次数:
242
//我刚开始竟然用bfs做,不断的wa,bfs是用来求最短路的而这道题是求固定时间的
//剪纸奇偶剪枝加dfs
#include
#include
#include
#include
using namespace std;
#define N 10
char ma[N][N];
struct node {
int x,y,step;
}ss,tt;
int dis[4][2]={1,0,-1,...
分类:
其他好文 时间:
2014-09-16 17:26:50
阅读次数:
194
cocos2d-js没有完整的鼠标事件处理,这点比js/flash的要差一些,不过凑合着也可以用了。一般界面编程,可以用显示列表的Node作为监听器的优先级,在上方的会比下方的高优先级。而cocos2d-js没有stopImmediatePropagation,只有stopProgapation,一...
分类:
其他好文 时间:
2014-09-16 15:52:50
阅读次数:
162