奇怪的问题
查看原帖
奇怪的问题
1009402
QWQAWAQWQAWA楼主2024/8/8 17:23
	    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?

2024/8/8 17:23
加载中...