#include
#include
int n;
int m=2*n-1;
struct tree
{
float weight;
int parent;
int lch,rch;
};
struct codetype
{
int bits[100];
int start;
char ch;
};
tree hftree[100];
codetype code[99];
void creathuffmantree(int n,int m)
{
int i,j ,p1,p2;
float s1,s2;
for(i=1;i