淘先锋技术网

首页 1 2 3 4 5 6 7

intmain(){cout<<"----输入------"<<endl;intn;cin>>n;float*w=newfloat[n];char**Hcode=newchar*[n];string*c=newstring[n];

for(inti=0;i<n;++i){chara[10];Hcode[i]=a;cin>>Hcode[i]>>w[i];c[i]=Hcode[i];}HuffmanCode(w,n,Hcode);cout<<"----输出------"<<endl;for(inti=1;i<=n;++i){cout<<c[i-1]<<""<<Hcode[i]<<endl;}

return0;

}