typedef struct HBitreenode{
int weight;
int lchild,rchild,parent;
}HBitreenode,*HBitree;
typedef char**hfcode;
int a[50]={0},t=0;
char b[50]={'\0'};
int choose(HBitree p,int a,int i)
{
int temp1,k;
int j=0;
temp1=10000;
for(;j<=i;j++,p++)
if(p->weight<=temp1&&p->parent==0&&j!=a)
{
temp1=p->weight;
k=j;
}
return k;
}
void count_char(char *c)
{ char *p;
int k=0,i;
printf("请输入一段字符串\n\n");
gets(c);
p=c;
while(*p!='\0')
{
i=0;
while(b[i]!='\0')
{
if(b[i]==*p)
{
i=0;
p++;
continue;
}
else i++;
}
b[k]=*p;
k++;
p++;
}
}
void cout_weight(char *c)
{
char *p;
p=c;
while(b[t]!='\0')
{
p=c;
while(*p!='\0')
{
if(*p==b[t])