100% Guaranteed Results


Exercises – Programming assignment 10 Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

Huffman code

Input (Standard input)
In the first line, an integer N is given which means the number of character
(1 ≤ N ≤ 30000).
Next each N line, character and number of character are given.
(Length of character is always 4)
Last line, an integer S is given which mean total number of character in text

Output (Standard output)
In the first line, print the number of bits using fixed-length code
In the next line, print the number of bits using Huffman code

[Example]
Sample Input Sample Output
6 ffff 5000 eeee 9000 cccc 12000 bbbb 13000 dddd 16000 aaaa 45000 100000 300000
224000

Description
1. File name must be Huffman.cpp
2. Make a comment of your student ID, name and class in the first line of the source code. ex) 2014601028_Honggildong_A
3. Please keep the source code that you have submitted for some unexpected accident.

Reviews

There are no reviews yet.

Be the first to review “Exercises – Programming assignment 10 Solved”

Your email address will not be published. Required fields are marked *

Related products