摘要: 这道题目,我做的时候不会哈夫曼树,自己贪心是错的都不知晓。还可以发现这里不必用优先队列,可以用两个队列,毕竟插入的数是有单调性的。 阅读全文
posted @ 2016-09-18 21:23 TenderRun 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Sample Input 2 3 2 1 2 3 2 5 5 2 1 7 3 1 7 4 2 5 5 2 6 Sample Output 7 63 这类题目就是分类讨论,需要多做做。 1 #include <iostream> 2 #include <cstring> 3 #include <cst 阅读全文
posted @ 2016-09-18 20:45 TenderRun 阅读(217) 评论(0) 推荐(0) 编辑