没有对值进行改动就自动变为0了,为什么
int main(){
double p=0.75,Er,D,Tr;
int x1[N]={0},x2[N]={0},x3[N]={0},x4[N]={0},z[N]={1,0,0,0,0,1,1,0,1,0,1,0,1,1,1,0,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,1,1,0,1,0,1,1,0,0,1,0,0,0,1,1,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,0,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,1,1,0,1,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0};
int i,ca;
Er=N*(2*p-1);
D=4*N*p*(1-p);
Tr=Er-3.09*sqrt(D);
for (i=0;i<32768;i++)//31977
{
ca=abs(acc_Ca(i,z));
if((double)ca>=Tr) //只有当i=31977时才满足条件
{
printf("%d ",ca);
printf("\n accept %d \n ",i);
check(x1,x2,i);
acc_x3x4(x1,x2,x3,x4,z);//当i=31977调试完这一步时,p,Er,D,Tr,的值全部变成了0
}
}
}
和注释中的一样,但是如果不调试acc_x3x4(x1,x2,x3,x4,z)这一步,p,Er,D,Tr,的值还是原来的状态