希表最大长*/Р#define L 60 /*定义哈希表长*/Р#define M 97 /*定义p值*/Р#define N 50 /*定义名单长*/Рint hl=50;Рchar z[22];Рstruct old{char *name;char *py;int k;char tel[10];};Рstruct old oldlist[MOSTL];/*原始表*/Рstruct htermР{ char *name;char *py;Рint k;int si;Р};Рstruct hterm hlist[MOSTL];/*哈希表*/Рint i,adr,sum,d;Рchar ch1;Рfloat average;Р/**********************************/Рvoid chash()Р{for (i=0;i<hl;i++)Р {hlist[i].name="";Р hlist[i].py="";Р hlist[i].k=0;Р hlist[i].si=0;Р };Рfor (i=0;i<N;i++)Р { sum=0;Р adr=(oldlist[i].k)%M;Р d=adr;Р if(hlist[adr].si==0)Р {hlist[adr].k=oldlist[i].k;Р hlist[adr].name=oldlist[i].name;Р hlist[adr].py=oldlist[i].py;Р hlist[adr].si=1;Р }Р elseР {doР {d=(d+((oldlist[i].k))%10+1)%M;/*伪随机*/Р sum=sum+1;Р }Р while (hlist[d].k!=0);Р hlist[d].k=oldlist[i].k;Р hlist[d].name=oldlist[i].name;