优先队列实例 poj 3253
摘要:
该题运用哈夫曼树,用优先队列求出两个最小的节点值,相加好push进队列中。知道队列为空为止。DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ≤ 50,000) units. He then purchases a single 阅读全文
posted @ 2012-07-02 00:01 yumao 阅读(132) 评论(0) 推荐(0)
浙公网安备 33010602011771号