class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 the n * @return int整型 */ void BackTrack(int n,int row,unordered_set<int>& cols,unordered_set<int>& diag1,unordered_set<int>& diag2,int& counter) { if(row==n)//每行放一个,所有行都放完了 { co...