220 - Othello java

这题终于ac了,格式上有个大坑,如下:

Black -  7 White -  6,这个东西如果数字是1位数,前面就是2个空格,如果是2位数,前面就是1个空格....题目又不说,多亏是照着udebug设置的格式,要不永远都ac不了
System.out.println("Black - "+String.format("%2d",cha[1])+" White - "+String.format("%2d",cha[0]));

下面是ac的代码,下面是最开始存在格式错误的代码


import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    static char[][] board;
    static char current;
    static Scanner sc = new Scanner(System.in);
    //上下左右,左上,右上,左下,右下
    static int[] xArr = {0,0,-1,1,-1,1,-1,1};
    static int[] yArr = {-1,1,0,0,-1,-1,1,1};

    public static void main(String[] args) {
        int m = Integer.parseInt(sc.nextLine());
        while(m-->0){
            //把输入数据转换成 二维字符数组
            board = new char[11][11];
            for (int i = 0; i < 8; i++) {
                board[i] = sc.nextLine().toCharArray();
            }
            //当前是哪方下子
            current = sc.nextLine().charAt(0);
            //存当前什么操作的字符数组
            char[] ml = new char[3];
            while((ml=sc.nextLine().toCharArray())[0]!='Q'){
                if(ml[0]=='L'){
                    //调用l方法
                    ArrayList<String> list = l();
                    if(list.size()==0){
                        System.out.println("No legal move.");
                    }else{
                        for (int i = 0; i < list.size(); i++) {
                            if(i==list.size()-1) System.out.print(list.get(i).trim());
                            else System.out.print(list.get(i));
                        }
                        System.out.println();
                    }
                }else if (ml[0]=='M'){
                    //调用m方法
                    m(ml);
                }
            }
            pr(m);
            if(m!=0) System.out.println();
        }
    }
    public static ArrayList l(){
        ArrayList<String> strList = new ArrayList<>();
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                if (board[i][j]!='-') continue;
                w3:for (int k = 0; k < 8; k++) {
                    int ii=i,jj=j;
                    ii+=xArr[k];
                    jj+=yArr[k];
                    int count =1;//辅助判断
                    while(ii>=0 && ii<=7 && jj>=0 && jj<=7){
                        if(board[ii][jj] == '-') break;
                        else if(board[ii][jj]!=current){
                            ii+=xArr[k];
                            jj+=yArr[k];
                            count++;
                        }
                        else if (board[ii][jj]==current){
                            if(count >=2){
                                strList.add("("+(i+1)+","+(j+1)+") ");
                                break w3;
                            }else{
                                break;
                            }
                        }
                    }
                }
            }
        }
        return strList;
    }
    public static void m(char[] ml){
        //调用l方法,求合法位置
        ArrayList list = l();
        String str1 = "("+ml[1]+","+ml[2]+") ";
        //没有合法操作,就把current换成另一方
        if(!list.contains(str1)){
            current = current=='W'?'B':'W';
        }
        //放下棋子,改变其他颜色的棋子
        int x=ml[1]-49;
        int y=ml[2]-49;
        board[x][y] = current;
        for (int i = 0; i < 8; i++) {
            int ii=x,jj=y;
            ii+=xArr[i];
            jj+=yArr[i];
            int count =1;//辅助判断
            while(ii>=0 && ii<=7 && jj>=0 && jj<=7){
                if(board[ii][jj] == '-') break;
                else if(board[ii][jj]!=current){
                    ii+=xArr[i];
                    jj+=yArr[i];
                    count++;
                }
                else if (board[ii][jj]==current){
                    if(count >=2){
//                        strList.add("("+(i+1)+","+(j+1)+") ");
                        //这个方向的i是可行的,更改棋子,计算数量
                        int i2 = x,j2 = y;
                        while (board[i2+=xArr[i]][j2+=yArr[i]]!=current){
                            board[i2][j2] = current;
                        }
                        break;
                    }else{
                        break;
                    }
                }
            }
        }
        int[] cha = cha();
        System.out.println("Black - "+String.format("%2d",cha[1])+" White - "+String.format("%2d",cha[0]));
        //改current
        current = current=='W'?'B':'W';
    }

    public static int[] cha(){
        int[] arr = new int[2];
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                if (board[i][j]=='W') arr[0]++;
                else if (board[i][j]=='B') arr[1]++;
            }
        }
        return arr;
    }
    //打印棋盘
    public static void pr(int m){
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                System.out.print(board[i][j]);
            }
            System.out.println();
        }
    }
}

 

 

提交uva ,报错Presentation error...这种错误的意思是输出结果对的,但格式有误,可能多个空格,少个回车什么的.改了半天,还是报这个错,网上的代码都是用c写的,也没找到java的,没办法了,先把代码贴这吧,以后有机会了在研究

package com.uva;

import java.util.ArrayList;
import java.util.Scanner;

public class Othello {
    static char[][] board;
    static char current;
    static Scanner sc = new Scanner(System.in);
    //上下左右,左上,右上,左下,右下
    static int[] xArr = {0,0,-1,1,-1,1,-1,1};
    static int[] yArr = {-1,1,0,0,-1,-1,1,1};

    public static void main(String[] args) {
        int m = Integer.parseInt(sc.nextLine());
        while(m-->0){
            //把输入数据转换成 二维字符数组
            board = new char[11][11];
            for (int i = 0; i < 8; i++) {
                board[i] = sc.nextLine().toCharArray();
            }
            //当前是哪方下子
            current = sc.nextLine().charAt(0);
            //存当前什么操作的字符数组
            char[] ml = new char[3];
            while((ml=sc.nextLine().toCharArray())[0]!='Q'){
                if(ml[0]=='L'){
                    //调用l方法
                    ArrayList<String> list = l();
                    if(list.size()==0){
                        System.out.println("No legal move.");
                    }else{
                        for (int i = 0; i < list.size(); i++) {
                            if(i==list.size()-1) System.out.print(list.get(i).trim());
                            else System.out.print(list.get(i));
                        }
                        System.out.println();
                    }
                }else if (ml[0]=='M'){
                    //调用m方法
                    m(ml);
                }
            }
            pr();
            if(m!=0) System.out.println();
        }
    }
    public static ArrayList l(){
        ArrayList<String> strList = new ArrayList<>();
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                if (board[i][j]!='-') continue;
                w3:for (int k = 0; k < 8; k++) {
                    int ii=i,jj=j;
                    ii+=xArr[k];
                    jj+=yArr[k];
                    int count =1;//辅助判断
                    while(ii>=0 && ii<=7 && jj>=0 && jj<=7){
                        if(board[ii][jj] == '-') break;
                        else if(board[ii][jj]!=current){
                            ii+=xArr[k];
                            jj+=yArr[k];
                            count++;
                        }
                        else if (board[ii][jj]==current){
                            if(count >=2){
                                strList.add("("+(i+1)+","+(j+1)+") ");
                                break w3;
                            }else{
                                break;
                            }
                        }
                    }
                }
            }
        }
        return strList;
    }
    public static void m(char[] ml){
        //调用l方法,求合法位置
        ArrayList list = l();
        String str1 = "("+ml[1]+","+ml[2]+") ";
        //没有合法操作,就把current换成另一方
        if(!list.contains(str1)){
            current = current=='W'?'B':'W';
        }
        //放下棋子,改变其他颜色的棋子
        int x=ml[1]-49;
        int y=ml[2]-49;
        board[x][y] = current;
        for (int i = 0; i < 8; i++) {
            int ii=x,jj=y;
            ii+=xArr[i];
            jj+=yArr[i];
            int count =1;//辅助判断
            while(ii>=0 && ii<=7 && jj>=0 && jj<=7){
                if(board[ii][jj] == '-') break;
                else if(board[ii][jj]!=current){
                    ii+=xArr[i];
                    jj+=yArr[i];
                    count++;
                }
                else if (board[ii][jj]==current){
                    if(count >=2){
//                        strList.add("("+(i+1)+","+(j+1)+") ");
                        //这个方向的i是可行的,更改棋子,计算数量
                        int i2 = x,j2 = y;
                        while (board[i2+=xArr[i]][j2+=yArr[i]]!=current){
                            board[i2][j2] = current;
                        }
                        break;
                    }else{
                        break;
                    }
                }
            }
        }
        int[] cha = cha();
        System.out.println("Black - "+cha[1]+" White - "+cha[0]);
        //改current
        current = current=='W'?'B':'W';
    }

    public static int[] cha(){
        int[] arr = new int[2];
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                if (board[i][j]=='W') arr[0]++;
                else if (board[i][j]=='B') arr[1]++;
            }
        }
        return arr;
    }
    //打印棋盘
    public static void pr(){
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 8; j++) {
                System.out.print(board[i][j]);
            }
            System.out.println();
        }
    }
}
/*
Othello is a game played by two people on an 8 x 8 board, using disks that are white on one side and
black on the other. One player places disks with the white side up and the other player places disks
with the black side up. The players alternate placing one disk on an unoccupied space on the board.
In placing a disk, the player must bracket at least one of the other color disks. Disks are bracketed
if they are in a straight line horizontally, vertically, or diagonally, with a disk of the current player’s
color at each end of the line. When a move is made, all the disks that were bracketed are changed to
the color of the player making the move. (It is possible that disks will be bracketed across more than
one line in a single move.)
On the left
Legal Moves for White
(2,3),(3,3),(3,5),(3,6)
(6,2),(7,3),(7,4),(7,5)
On the right
Board Configuration after
White Moves to (7,3)
Write a program to read a series of Othello games.
Input
The first line of the input is the number of games to be processed. Each game consists of a board
configuration followed by a list of commands. The board configuration consists of 9 lines. The first 8
specify the current state of the board. Each of these 8 lines contains 8 characters, and each of these
characters will be one of the following:
‘-’ indicating an unoccupied square
‘B’ indicating a square occupied by a black disk
‘W’ indicating a square occupied by a white disk
The ninth line is either a ‘B’ or a ‘W’ to indicate which is the current player. You may assume that
the data is legally formatted.
Then a set of commands follows. The commands are to list all possible moves for the current player,
make a move, or quit the current game. There is one command per line with no blanks in the input.
Output
The commands and the corresponding outputs are formatted as follows:
List all possible moves for the current player. The command is an ‘L’ in the first column of the
line. The program should go through the board and print all legal moves for the current player
in the format (x, y) where x represents the row of the legal move and y represents its column.
These moves should be printed in row major order which means:
1) all legal moves in row number i will be printed before any legal move in row number j if j
is greater than i
and 2) if there is more than one legal move in row number i, the moves will be printed in ascending
order based on column number.
All legal moves should be put on one line. If there is no legal move because it is impossible for the
current player to bracket any pieces, the program should print the message ‘No legal move.’
Make a move. The command is an ‘M’ in the first column of the line, followed by 2 digits in the
second and third column of the line. The digits are the row and the column of the space to place
the piece of the current player’s color, unless the current player has no legal move. If the current
player has no legal move, the current player is first changed to the other player and the move
will be the move of the new current player. You may assume that the move is then legal. You
should record the changes to the board, including adding the new piece and changing the color
of all bracketed pieces. At the end of the move, print the number of pieces of each color on the
board in the format ‘Black - xx White - yy’ where xx is the number of black pieces on the
board and yy is the number of white pieces on the board. After a move, the current player will
be changed to the player that did not move.
Quit the current game. The command will be a ‘Q’ in the first column of the line. At this point,
print the final board configuration using the same format as was used in the input. This terminates
input for the current game.
You may assume that the commands will be syntactically correct. Put one blank line between
output from separate games and no blank lines anywhere else in the output.
Sample Input
2
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M35
L
Q
WWWWB---
WWWB----
WWB-----
WB------
--------
--------
--------
--------
B
L
M25
L
Q
Sample Output
(3,5) (4,6) (5,3) (6,4)
Black - 1 White - 4
(3,4) (3,6) (5,6)
--------
--------
----W---
---WW---
---BW---
--------
--------
--------

No legal move.
Black - 3 White - 12
(3,5)
WWWWB---
WWWWW---
WWB-----
WB------
--------
--------
--------
--------


10
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M46
L
M34
L
M23
L
M47
L
M56
L
M57
L
M43
L
M33
L
M63
L
M64
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
B
L
M56
L
M64
L
M33
L
M57
L
M74
L
M53
L
M42
L
M84
L
M63
L
M34
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M64
L
M63
L
M35
L
M34
L
M62
L
M26
L
M43
L
M52
L
M23
L
M25
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M35
L
M56
L
M64
L
M53
L
M63
L
M25
L
M46
L
M73
L
M66
L
M57
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M53
L
M63
L
M35
L
M52
L
M51
L
M41
L
M31
L
M36
L
M64
L
M34
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
B
L
M34
L
M33
L
M65
L
M46
L
M36
L
M66
L
M43
L
M53
L
M22
L
M23
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M53
L
M65
L
M46
L
M52
L
M75
L
M76
L
M63
L
M35
L
M41
L
M47
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
B
L
M43
L
M33
L
M34
L
M35
L
M25
L
M53
L
M36
L
M24
L
M63
L
M65
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
B
L
M34
L
M53
L
M66
L
M56
L
M67
L
M35
L
M52
L
M33
L
M36
L
M62
Q
--------
--------
--------
---WB---
---BW---
--------
--------
--------
W
L
M64
L
M43
L
M35
L
M65
L
M75
L
M26
L
M42
L
M36
L
M46
L
M56
Q


(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(3,4) (3,6) (5,6)
Black -  3 White -  3
(2,3) (3,3) (4,3) (5,3) (6,3)
Black -  2 White -  5
(2,4) (3,6) (4,7) (5,6) (6,6)
Black -  5 White -  3
(3,3) (3,5) (3,7) (5,3) (5,6) (6,4)
Black -  4 White -  5
(2,4) (3,6) (5,7) (6,4) (6,5) (6,6)
Black -  7 White -  3
(4,3) (4,8) (6,3) (6,4) (6,5) (6,7)
Black -  6 White -  5
(1,2) (2,4) (3,2) (3,3) (3,5) (3,6) (4,2)
Black -  8 White -  4
(3,2) (4,8) (6,3) (6,4) (6,5) (6,7)
Black -  7 White -  6
(1,2) (1,3) (2,4) (3,5) (4,2) (5,3) (6,4)
Black -  9 White -  5
--------
--W-----
--BW----
--WBWBB-
---BBBB-
--WB----
--------
--------

(3,4) (4,3) (5,6) (6,5)
Black -  4 White -  1
(4,6) (6,4) (6,6)
Black -  3 White -  3
(3,3) (4,3) (5,3) (6,3) (7,3)
Black -  5 White -  2
(3,4) (3,6) (4,6) (5,7)
Black -  3 White -  5
(6,3) (6,5) (6,6) (6,7) (7,4)
Black -  6 White -  3
(2,2) (3,4) (3,5) (5,3) (7,3)
Black -  5 White -  5
(4,2) (4,6) (6,2) (6,3) (6,5) (6,6) (6,7)
Black -  7 White -  4
(2,2) (3,4) (3,5) (3,6) (5,2) (7,3) (8,4)
Black -  5 White -  7
(5,8) (6,3) (6,5) (6,6) (6,7) (7,5)
Black -  7 White -  6
(2,2) (3,1) (3,4) (3,5) (5,2) (6,2)
Black -  4 White - 10
--------
--------
--BW----
-B-WW---
--BWWWW-
--BW----
---W----
---W----

(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(4,3) (6,3) (6,5)
Black -  3 White -  3
(3,5) (4,6) (5,3) (6,2)
Black -  2 White -  5
(3,4) (3,6) (5,6) (6,5) (7,4)
Black -  4 White -  4
(2,3) (2,4) (3,3) (4,3) (5,3) (6,2) (7,2)
Black -  3 White -  6
(2,6) (3,6) (4,6) (5,6) (6,6) (7,2) (7,4)
Black -  5 White -  5
(2,3) (2,4) (2,5) (3,3) (4,3) (5,3)
Black -  4 White -  7
(3,2) (3,6) (5,2) (5,3) (5,6) (6,5) (7,2) (7,4)
Black -  6 White -  6
(1,7) (2,3) (2,4) (2,5) (4,1) (4,2) (5,3)
Black -  5 White -  8
(2,4) (2,5) (3,3) (3,6) (4,6) (5,3) (5,6) (6,5) (7,2) (7,4)
Black -  7 White -  7
--------
--W-BB--
---BB---
--BWW---
-B-BW---
-WWW----
--------
--------

(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(3,4) (3,6) (5,6)
Black -  3 White -  3
(6,3) (6,4) (6,5) (6,6) (6,7)
Black -  2 White -  5
(2,5) (3,3) (3,4) (5,3) (7,3)
Black -  4 White -  4
(4,2) (4,6) (6,2) (6,3) (6,5) (6,6) (6,7)
Black -  3 White -  6
(2,5) (2,6) (3,3) (3,4) (7,3) (7,5)
Black -  6 White -  4
(2,6) (3,6) (4,2) (4,3) (4,6) (5,2) (5,7) (6,2) (6,6)
Black -  4 White -  7
(3,4) (3,6) (5,7) (6,5) (7,3) (7,5)
Black -  6 White -  6
(1,5) (2,4) (2,6) (4,2) (5,2) (5,7) (6,2) (6,6) (6,7) (7,2) (8,2)
Black -  5 White -  8
(3,6) (3,7) (5,7) (6,5) (7,5)
Black - 10 White -  4
--------
----B---
----B---
---WWB--
--BBBBB-
--BW-W--
--B-----
--------

(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(4,3) (6,3) (6,5)
Black -  3 White -  3
(3,5) (4,6) (6,4) (7,3)
Black -  2 White -  5
(3,4) (3,6) (4,3) (5,2) (5,6)
Black -  4 White -  4
(5,1) (6,2) (6,4) (7,2)
Black -  1 White -  8
(3,6) (4,1) (4,3)
Black -  3 White -  7
(3,1) (7,2) (7,3)
Black -  2 White -  9
(3,6) (4,3) (5,6)
Black -  5 White -  7
(3,7) (4,6) (6,4) (7,3) (7,4)
Black -  4 White -  9
(2,5) (3,4) (4,3) (5,6) (6,5)
Black -  6 White -  8
--------
--------
W--BBB--
W--WB---
WBWWW---
--BW----
--------
--------

(3,4) (4,3) (5,6) (6,5)
Black -  4 White -  1
(3,3) (3,5) (5,3)
Black -  3 White -  3
(3,2) (4,3) (5,6) (6,5)
Black -  5 White -  2
(2,4) (3,5) (4,6) (6,4) (6,6)
Black -  4 White -  4
(2,2) (3,2) (3,5) (3,6) (3,7) (5,6)
Black -  6 White -  3
(2,4) (2,6) (3,5) (6,4) (6,6)
Black -  5 White -  5
(3,2) (4,3) (4,7) (5,6) (6,7)
Black -  7 White -  4
(2,6) (3,5) (4,2) (5,3) (6,4) (7,5)
Black -  5 White -  7
(2,2) (3,2) (4,2) (4,7) (5,2) (5,6) (6,2) (6,3) (6,4) (6,7) (7,7)
Black -  7 White -  6
(1,1) (2,3) (2,4) (2,5) (2,6) (2,7) (3,5) (6,4) (7,5) (7,6)
Black -  6 White -  8
--------
-BW-----
--WB-B--
--WBBW--
--WWW---
----BW--
--------
--------

(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(4,3) (6,3) (6,5)
Black -  3 White -  3
(3,6) (4,6) (5,6) (6,6) (7,6)
Black -  2 White -  5
(3,3) (3,5) (3,7) (4,3) (5,2)
Black -  5 White -  3
(6,2) (6,3) (6,4) (6,6) (7,5)
Black -  3 White -  6
(3,4) (3,5) (3,6) (5,6) (7,6)
Black -  5 White -  5
(5,1) (6,2) (6,3) (6,4) (7,7)
Black -  4 White -  7
(3,5) (4,3) (5,6) (7,3) (7,4) (8,5)
Black -  8 White -  4
(2,4) (2,5) (3,4) (3,6) (4,1) (4,3) (5,1) (5,6) (6,4) (7,7) (8,7)
Black -  7 White -  6
(3,7) (4,3) (4,7) (5,1) (5,7) (6,4) (7,2) (7,3) (7,4) (8,5)
Black -  9 White -  5
--------
--------
----B---
W--BBBB-
-WBWB---
--W-B---
----WB--
--------

(3,4) (4,3) (5,6) (6,5)
Black -  4 White -  1
(3,3) (3,5) (5,3)
Black -  3 White -  3
(2,3) (3,4) (5,6) (6,5)
Black -  5 White -  2
(3,5) (5,3)
Black -  3 White -  5
(2,2) (2,3) (2,4) (2,5) (2,6) (3,6) (4,6) (5,6) (6,6)
Black -  5 White -  4
(1,5) (2,3) (4,2) (5,3) (6,3)
Black -  2 White -  8
(3,2) (3,6) (5,2) (5,6) (6,4) (6,5)
Black -  4 White -  7
(1,5) (1,6) (2,3) (2,4) (2,6) (2,7) (3,7)
Black -  3 White -  9
(1,3) (2,3) (3,2) (5,2) (6,2) (6,3) (6,5)
Black -  6 White -  7
(1,5) (1,6) (2,6) (3,7) (4,6) (5,6) (6,4) (6,5) (7,3)
Black -  5 White -  9
--------
---WB---
--WWBB--
--WWB---
--WWW---
--B-W---
--------
--------

(3,4) (4,3) (5,6) (6,5)
Black -  4 White -  1
(3,3) (3,5) (5,3)
Black -  3 White -  3
(6,2) (6,3) (6,4) (6,5) (6,6)
Black -  5 White -  2
(2,4) (3,5) (3,6) (5,6)
Black -  4 White -  4
(4,6) (6,2) (6,3) (6,4) (6,5) (6,7)
Black -  6 White -  3
(2,4) (3,3) (3,5) (3,6) (5,7) (7,7)
Black -  4 White -  6
(3,3) (3,6) (5,2) (6,4)
Black -  8 White -  3
(2,3) (2,4) (3,3) (6,2) (6,3) (6,4) (6,5) (7,7) (7,8)
Black -  7 White -  5
(2,2) (2,3) (2,4) (2,5) (2,6) (3,6)
Black -  9 White -  4
(3,7) (4,6) (6,2) (6,4) (6,5) (7,7) (7,8)
Black -  8 White -  6
--------
--------
--WWWB--
---WB---
-BWBBB--
-W---BB-
--------
--------

(3,5) (4,6) (5,3) (6,4)
Black -  1 White -  4
(4,3) (6,3) (6,5)
Black -  3 White -  3
(3,2) (3,3) (3,4) (3,5) (3,6)
Black -  2 White -  5
(2,6) (4,6) (6,5) (6,6) (7,4)
Black -  4 White -  4
(3,3) (3,4) (4,2) (5,3) (6,3) (6,6) (7,5)
Black -  3 White -  6
(2,6) (3,6) (4,6) (5,6) (6,6) (7,4) (7,6)
Black -  5 White -  5
(2,5) (3,2) (3,3) (3,4) (4,2) (5,3) (6,3)
Black -  3 White -  8
(3,2) (3,4) (3,6) (5,3) (5,6) (7,4) (7,6) (8,5)
Black -  5 White -  7
(1,7) (2,5) (4,6) (5,3)
Black -  4 White -  9
(3,2) (3,4) (5,3) (5,6) (5,7) (7,4) (7,6) (8,5)
Black -  7 White -  7
--------
-----B--
----BB--
-WWWWB--
---BBB--
---WW---
----W---
--------

 */

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值