Description: There are articles, please use the binary prefix code for the article appeared in the encoding of all characters, so that the encoded length of the shortest articles. Multiple input, the first positive integer T that group number. The first line in each group there is a positive integer n, 1 ≤ n ≤ 100000 characters used in that species. Then a positive integer n an act, that each character appears in the article the number of times. The minimum length of the output encoding
To Search:
File list (Check if you may need any files):
1289_Huffman Code .c