Fork Copy #include using namespace std; int n; int board[4][4]; int maxscore; int visited[4][4]; void tang(int r, int c){ int tmp1=c, tmp2=c; // danh dau het phia ben trai cua hang cho den khi gap X while (tmp1>=0 && !board[r][tmp1]) visited[r][tmp1--]++; // danh dau phia ben phai while (tmp2=0 && !board[tmp1][c]) visited[tmp1--][c]++; // danh dau phia duoi while (tmp2=0 && !board[r][tmp1]) visited[r][tmp1--]--; // danh dau phia ben phai while (tmp2=0 && !board[tmp1][c]) visited[tmp1--][c]--; // danh dau phia duoi while (tmp2maxscore) maxscore=score; for (int i=0;i>T; for (int tc=1;tc<=T;tc++){ cout<<"Case #"<>n; for (int i=0;i>tmp; if (tmp=='.') board[i][j]=0; else if (tmp=='X') board[i][j]=1; // cout<