C++ Simple Naive Approach
```\nvector> queensAttacktheKing(vector>& queens, vector& king) {\n        vector> qn(8,vector(8,0)),ans;\n        \n        for(int i=0;i=0;i--)\n        {\n  
```\nvector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) {\n        vector<vector<int>> qn(8,vector<int>(8,0)),ans;\n        \n        for(int i=0;i<queens.size();i++)\n        {\n            qn[queens[i][0]][queens[i][1]]=1;\n        }\n        //same col towards up\n        for(int i=king[0]-1;i>=0;i--)\n        {\n            if(qn[i][king[1]])\n            {\n                ans.push_back({i,king[1]});\n                break;\n            }\n        }\n        //same col towards down\n        for(int i=king[0]+1;i<8;i++)\n        {\n            if(qn[i][king[1]])\n            {\n                ans.push_back({i,king[1]});\n                break;\n            }\n        }\n        //same row towards left\n        for(int i=king[1]-1;i>=0;i--)\n        {\n            if(qn[king[0]][i])\n            {\n                ans.push_back({king[0],i});\n                break;\n            }\n        }\n        //same row towards right\n        for(int i=king[1]+1;i<8;i++)\n        {\n            if(qn[king[0]][i])\n            {\n                ans.push_back({king[0],i});\n                break;\n            }\n        }\n        //top left\n        int j=king[1];\n        for(int i=king[0];i>=0 && j>=0;i--)\n        {\n            if(qn[i][j])\n                {\n                    ans.push_back({i,j});\n                    break;\n                }\n            j--;\n        }\n        //bottom right\n        j=king[1];\n        for(int i=king[0];i<8 && j<8;i++)\n        {\n            if(qn[i][j])\n                {\n                    ans.push_back({i,j});\n                    break;\n                }\n            j++;\n        }\n        //top right\n        j=king[1];\n        for(int i=king[0];i>=0 && j<8;i--)\n        {\n            if(qn[i][j])\n                {\n                    ans.push_back({i,j});\n                    break;\n                }\n            j++;\n        }\n        //bottom  left\n        j=king[1];\n        for(int i=king[0];i<8 && j>=0;i++)\n        {\n            if(qn[i][j])\n                {\n                    ans.push_back({i,j});\n                    break;\n                }\n            j--;\n        }\n        \n        return ans;\n        \n    }
['C']