for(int i=1;i<=4;i++){ for(int j=1;j<=4;j++){ if(x[i]<y[j])cnt++; if(x[i]==y[j])dp++;//cout<<cnt<<" "; } }
这样是可以判断两个骰子的输赢的 然而,下面这样就不行
for(int i=1;i<=4;i++){ for(int j=i;j<=4;j++){ if(x[i]<y[j])cnt++; if(x[i]==y[j])dp++;//cout<<cnt<<" "; } }
why?