D | constexpr-nqueens.cpp | 5 struct Board { struct 9 constexpr Board() : State(0), Failed(false) {} in Board() argument 10 constexpr Board(const Board &O) : State(O.State), Failed(O.Failed) {} in Board() argument 11 constexpr Board(uint64_t State, bool Failed = false) : in Board() argument 13 constexpr Board addQueen(int Row, int Col) const { in addQueen() argument 14 return Board(State | ((uint64_t)Row << (Col * 4))); in addQueen() 35 constexpr Board buildBoardRecurse(int N, int Col, const Board &B); argument 36 constexpr Board buildBoardScan(int N, int Col, int Row, const Board &B); 37 constexpr Board tryBoard(const Board &Try, in tryBoard() 38 int N, int Col, int Row, const Board &B) { in tryBoard() [all …]
|