- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 线索二叉树的遍历(数据结构)
#include#include#define ERROR 0#define OK 1#define OVERFLOW -2typedef int Status;typedef char TElemType;typedef enum {Link,Thread} PointerTag;typedef struct BiThrNode{ TElemType data;
2015-11-25 10:41:39 580
原创 二叉树的遍历(数据结构)
#include#include#define ERROR 0#define OK 1#define OVERFLOW -2typedef int Status;typedef char TElemType;typedef struct BiTNode{ TElemType data; struct BiTNode *lchild,*rchild;} BiTNod
2015-11-18 10:56:41 709 1
转载 适合智商180以上的两人对弈游戏
今天在- 33IQ http://www.33iq.com/group/topic/43251/这个网站上看到的,相当于一个博弈吧,挺有意思的请别介意我用了一个如此有噱头的名字作为这个游戏的名字。今天这个推荐的这个【两个人两支笔一张纸】系列游戏中的一个可以称作史上最难的博弈游戏,其难度可以秒杀你常见的类似围棋象棋的博弈。http://arxiv.org/ab
2015-11-14 17:25:07 3838
原创 双向链表的算法设计和实现(数据结构)
#include#include#define Status int#define ElemType int#define OK 1#define ERROR 0#define OVERFLOW -2typedef struct DuLNode{ ElemType data; struct DuLNode *prior; struct DuLNode *ne
2015-11-13 13:43:55 798
原创 学弟问题两个(DP和大数问题处理)
今天帮学弟解的两个题,问题较简单,但对于我来说还得好好学下:第一题思路可以用递归,然而我的递归学得不好orz,感觉DP的代码更简单,运用动态转移方程dp[j]=dp[j]+dp[j-i],代码如下:#include#includeint main(){ int dp[100+5]; memset(dp,0,sizeof(dp)); dp[0]=
2015-11-12 23:16:17 415
转载 DP问题各种模型的状态转移方程
转自:http://www.cnblogs.com/10jschen/archive/2012/08/19/2646087.html1(最长公共子串(注意和最长公共子序列区别))两个字符串str1和str2,长度分别为(l1,l2)dp[i][j]表示以两个字符串分别以第i和第j个字符结尾所能达到的公共子序列的长度,由于下面涉及到i-1和j-1,那么这个时候我们一般从i=1
2015-11-12 22:44:58 735
原创 循环队列的表示和实现(数据结构)
#include#include#define ERROR 0#define OK 1#define OVERFLOW -2#define MAXQSIZE 6typedef int Status;typedef int QElemType;typedef struct{ QElemType *base; int front; int rear;
2015-11-11 10:47:59 580
原创 队列的链式表示和实现(数据结构)
#include#include#define OK 1#define ERROR 0#define OVERFLOW -2#define INFEASIBLE -1typedef int Status;typedef int QElemType;typedef struct QNode{ QElemType data; struct QNode *next;}
2015-11-01 11:21:55 1018
原创 栈的顺序表示和实现(数据结构)
#include#include#define ERROR 0#define OVERFLOW -2#define OK 1#define STACK_INIT_SIZE 5#define STACKINCREMENT 2typedef int SElemType;typedef int Status;typedef struct{ SElemType *base;
2015-11-01 11:06:21 681
原创 线性表的链式表示和实现(数据结构)
#include#include#define ERROR 0#define OVERFLOW -2#define OK 1typedef int ElemType;typedef int Status;typedef struct LNode{ ElemType data; struct LNode *next;}LNode,*LinkList;void Cre
2015-11-01 10:46:31 476
原创 ACdream 1196 KIDx's Pagination(模拟)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=71823#include#include#include#include#include#include#include#include#include#include#include#include#include#includeus
2015-11-01 08:31:29 501
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人