public void dfs(char[][] board, int[] occupy, int column) {
        if (column == board[0].length) {
            count += 1;
            return;
        }
        for (int i = 0; i < board.length; ++i) {
            if (valid(board, i, column, occupy)) {
                board[i][column] = 'Q';
                occupy[column] = i;
                dfs(board, occupy, column + 1);
                occupy[column] = -1;
                board[i][column] = '.';
            }
        }
    }