模仿一下官方题解: class Solution { public: bool isValid(vector<int> &pos, int row, int col) { if(row==0)return true; for(int i=0;i<row;i++) {  ...