bupt_xiaoz

###### poj3253 huffman tree

Poj 3253

armer 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 long board just long enough to saw into the N planks (i.e., whose length is the sum of the lengths Li ). FJ is ignoring the "kerf", the extra length lost to sawdust when a sawcut is made; you should ignore it, too.

FJ sadly realizes that he doesn't own a saw with which to cut the wood, so he mosies over to Farmer Don's Farm with this long board and politely asks if he may borrow a saw.

Farmer Don, a closet capitalist, doesn't lend FJ a saw but instead offers to charge Farmer John for each of the N -1 cuts in the plank. The charge to cut a piece of wood is exactly equal to its length. Cutting a plank of length 21 costs 21 cents.

Farmer Don then lets Farmer John decide the order and locations to cut the plank. Help Farmer John determine the minimum amount of money he can spend to create the N planks. FJ knows that he can cut the board in various different orders which will result in different charges since the resulting intermediate planks are of different lengths.

#### thinkphp5微信开发实践教程

2017年08月15日 11:23

#### POJ3253 Huffman Tree

2017-05-29 13:55:43

#### 构造HuffmanTree

2011-05-05 13:18:00

#### Huffman树的建立(c++实现)

2009-10-06 17:39:00

#### Huffman树与Huffman编码（C语言实现）

2012-08-07 04:23:31

#### 【数据结构与算法】Huffman树&&Huffman编码（附完整源码）

2014-02-15 00:27:44

#### Haskell实现Huffman编码解码

2010-06-11 23:17:00

#### POJ3253解题报告

2010-02-18 12:47:00

#### C语言实现Huffman Tree（参考严蔚敏《数据结构》部分伪码）

2018-03-26 11:53:15

#### 范式哈夫曼算法的分析与实现（论文）

2010年10月29日 237KB 下载

## 不良信息举报

poj3253 huffman tree