摘要:
这里是11.28随笔。 代码留档,题目是上一回的: include include include using namespace std; const int N=10010; struct node{ int num,fa,ch; }; bool st[N]; int n; node* node 阅读全文
摘要:
这里是11.26随笔。 题目留档:输入一组整型权值,构建哈夫曼树,实现哈夫曼编码,并输出带权路径长度。 输入格式: 第一行输入叶子结点个数,接着依次输入权值。若叶子数为0或1,则输出error 输出格式: 输出哈夫曼编码,输出带权路径长度。 代码: include include include i 阅读全文