#include<stdio.h> int val[8][8]={0},count=0; bool judge(int row,int col)//对棋盘进行判断如果违反规则就返回错误 {int i,j;for(i=0;i<row;i++){if(val[i][col]==1)//……