Screen.h#ifndef SCREEN_H#define SCREEN_H#include
class Screen {public: typedef std::string::size_type pos; // Action is a type
that can point to...
分类:
其他好文 时间:
2014-06-04 20:59:09
阅读次数:
350
简单深搜,可以完全暴力,不会超时的。#include#include#includeusing
namespace std;#define MAX(a,b) (a>b?a:b) char maze[10][10];int n, maxn;void
DFS(int step,int count);in...
分类:
Web程序 时间:
2014-06-04 20:43:04
阅读次数:
270
6 调用栈实例分析 本节通过代码实例分析函数调用过程中栈帧的布局、形成和消亡。6.1 栈帧的布局
示例代码如下: 1 //StackReg.c 2 #include 3 4 //获取函数运行时寄存器%ebp和%esp的值 5 #define
FETCH_SREG(_ebp, _esp) ...
分类:
编程语言 时间:
2014-06-04 19:30:54
阅读次数:
420
bfs+优先队列。wa了N次,才发现可以停留等待楼梯变换方向。 1 #include 2
#include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXNUM 55 8 9
typedef struct node...
分类:
其他好文 时间:
2014-06-03 13:26:06
阅读次数:
274
http://poj.org/problem?id=3270这道题就是给你一个无序序列转换成有序序列需要花费的代价最小,交换a和b代价为a+b; 1
#include 2 #include 3 #include 4 #define maxn 20000 5 using namespace st...
分类:
其他好文 时间:
2014-06-03 13:14:32
阅读次数:
272
windows client 端口// Def_win_client_socket_test.cpp
: 定义控制台应用程序的入口点。//#include "stdafx.h"#include #pragma
comment(lib,"ws2_32.lib")#define PORT 4000#de...
题目链接:点击打开链接题意比較明显,不赘述。删除时能够把i-1转到根,把i+1转到根下则i点就在
根右子树 的左子树,且仅仅有i这一个 点#include#include#include#includeusing namespace std;#define
N 300500#define inf 1...
分类:
其他好文 时间:
2014-06-03 11:29:26
阅读次数:
277
本节来看一下在cocos2d-x中,常用的一些绘图api;先来看一个工具类,以便于快速指定游戏窗口的一些位置,如左上,右上等;VisibleRect.h#ifndef
__VISIBLERECT_H__#define __VISIBLERECT_H__#include "cocos2d.h"clas...
linux下常用时间类型有四种: time_t 、 struct tm、 struct timeval
、 struct timespec1、time_t 时间函数 time_t 类型在time.h中定义: #ifndef __TIME__T #define
__TIME_...
分类:
系统相关 时间:
2014-05-30 23:18:32
阅读次数:
467
http://poj.org/problem?id=1026这道题题意是给你一个置换群,再给你一个字符串,输出经过k次置换的字符串。 就是找循环节。 1
#include 2 #include 3 #include 4 #define maxn 3000 5 using namespace s...
分类:
其他好文 时间:
2014-05-30 21:45:37
阅读次数:
249