easy
\nclass Solution {\npublic:\n    vector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) {\n        \n        vector<vector<int>
```\nclass Solution {\npublic:\n    vector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) {\n        \n        vector<vector<int>> board(8,vector<int>(8,0)) ;\n        \n        for(int i=0;i<queens.size();i++)  board[queens[i][0]][queens[i][1]]=1;\n       \n        vector<vector<int>> ans;\n        for(int i=-1;i<=1;i++){\n           for(int j=-1;j<=1;j++){\n               if(i==0&&j==0) continue;\n                int posi=king[0], posj=king[1];\n               \n               while(0<=posi&&posi<8&&0<=posj&&posj<8){\n                 if(board[posi][posj]) {ans.push_back({posi,posj});   break;}\n                   posi=posi+i;\n                   posj=posj+j;\n                   \n               }\n           }\n       }\n        return ans;\n      \n    }\n};\n```
['C']