- 博客(7)
- 收藏
- 关注
原创 实验7.6哈夫曼编码
#include #include #include #define N 50 #define M 2*N-1 using namespace std; typedef struct { char data[5]; int weight; int parent; int lchild; int rchild; } HTNode;
2016-06-13 17:23:08 1932
原创 用二叉树遍历思想解决的一些问题
(1)计算二叉树节点个数; #include #include"btree.h" #include using namespace std; int Nodes(BTNode *b) { if(b==NULL) return 0; else return Nodes(b->lchild)+Nodes(b->rchild)+1; } int mai
2016-06-05 10:41:02 446
原创 数据结构二叉树的递归遍历
btree.h #ifndef BTREE_H_INCLUDED #define BTREE_H_INCLUDED typedef char ElemType; #define MaxSize 101 typedef struct node { ElemType data; struct node *lchild; struct node *rchild; }BTNode
2016-06-05 09:57:59 352
原创 二叉树的基本操作
多文件组织: main.cpp: #include #include #include #include"btree.h" using namespace std; void CreateBTNode(BTNode *&b,char *str); BTNode *FindNode(BTNode *b,ElemType x); BTNode *LchildNode(BTNode *p); BT
2016-06-05 09:21:50 545
原创 1027. Colors in Mars (20)
1027. Colors in Mars (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue People in Mars represent the colors in thei
2016-06-01 20:44:54 227
原创 1019. General Palindromic Number (20)
范星月 [编辑资料] [登出] 主页 题目集 基本信息 题目列表 提交列表 排名 帮助 1019. General Palindromic Number (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B
2016-06-01 13:44:17 521
原创 1013. Battle Over Cities (25) 连通图
1013. Battle Over Cities (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue It is vitally important to have all the
2016-06-01 10:48:48 551
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人