摘要: #include <iostream>#include <cstdio>#include <cmath>#include <algorithm>#include <cstring>#include <stdlib.h> using namespace std; #define list_max 10 阅读全文
posted @ 2016-07-18 20:07 JungleHuter 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <limits.h>#include <string.h>#include <stdlib.h> #define N 6 typedef struct huffNode{ unsigned int weight; //权重 unsigned in 阅读全文
posted @ 2016-07-18 20:06 JungleHuter 阅读(239) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string.h>#include <stdlib.h>#include <queue>#include <limits.h> using namespace std; #define MAXNUM 26 typedef struct { i 阅读全文
posted @ 2016-07-18 20:06 JungleHuter 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <stdlib.h> using namespace std; typedef struct node { struct node *leftnode; struct node *rightnode; char data;}BiTNode, * 阅读全文
posted @ 2016-07-18 20:05 JungleHuter 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <limits.h>#include <string.h>#include <stdlib.h> using namespace std;#define N 6typedef struct huffNode{ int weight; int l 阅读全文
posted @ 2016-07-18 20:05 JungleHuter 阅读(108) 评论(0) 推荐(0) 编辑
摘要: //路径压缩并查集 #define N 100int father[N];void init() { for(int i=0; i<N; i++) father[i] = i;}// 合并两个元素所在的集合void union(int x,int y) { x = getfather(x); y = 阅读全文
posted @ 2016-07-18 20:04 JungleHuter 阅读(378) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <malloc.h>#include <queue> using namespace std; int main(void){ queue<int> q; int a[10]; int n; cin >> n; for(int i = 0; i 阅读全文
posted @ 2016-07-18 20:04 JungleHuter 阅读(596) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <malloc.h>#include <stdlib.h>#include <cstdio> using namespace std;typedef struct Node{ int data;//数据域 struct Node *pnext; 阅读全文
posted @ 2016-07-18 20:02 JungleHuter 阅读(168) 评论(0) 推荐(0) 编辑