class Solution { public: /** * * @param n int整型 the n * @return int整型 */ int Nqueen(int n) { // write code here traceback(n, 0); return res; } void traceback(int n, int row) { if(row == n) { res++; return; } for(int i = 0; i<n; i++) { if(used_col[i] || used_left[i-row+n-1] || used_right[i+row]) c...