eightqueens.h

来自「数据结构 八皇后问题解决方案一 很好的代码」· C头文件 代码 · 共 15 行

H
15
字号
const int max_board = 30;



class Queens {

public:

   Queens(int size);

   bool is_solved() const;

   void print() const;

   bool unguarded(int col) const;

   void insert(int col);

   void remove(int col);

   int  board_size; //   dimension of board = maximum number of queens

private:

   int  count;      //   current number of queens = first unoccupied row

   bool queen_square[max_board][max_board];

};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?