C++, Simple Naive Solution, No Rocket Science
class Solution {\n# public:\n    vector> queensAttacktheKing(vector>& queens, vector& king) {\n        vector> ans;\n        map,bool> m;\n        for(auto it :
# class Solution {\n# public:\n    vector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) {\n        vector<vector<int>> ans;\n        map<pair<int,int>,bool> m;\n        for(auto it : queens)\n            m[{it[0],it[1]}]=true;\n        int kr=king[0],kc=king[1];\n        // top\n        for(int i=kr-1; i>=0; i--){\n            if(m.find({i,kc})!=m.end()){\n                ans.push_back({i,kc});\n                break;\n            }\n        }\n        //bottom\n        for(int i=kr+1; i<8; i++){\n            if(m.find({i,kc})!=m.end()){\n                ans.push_back({i,kc});\n                break;\n            }\n        }\n        //left\n        for(int i=kc-1; i>=0; i--){\n            if(m.find({kr,i})!=m.end()){\n                ans.push_back({kr,i});\n                break;\n            }\n        }\n        //right\n        for(int i=kc+1; i<8; i++){\n            if(m.find({kr,i})!=m.end()){\n                ans.push_back({kr,i});\n                break;\n            }\n        }\n        //top left\n        int i=kr-1,j=kc-1;\n        while(i>=0 && j>=0){\n            if(m.find({i,j})!=m.end()){\n                ans.push_back({i,j});\n                break;\n            }\n            i--; j--;\n        }\n        //bottom right\n        i=kr+1,j=kc+1;\n        while(i<8 && j<8){\n            if(m.find({i,j})!=m.end()){\n                ans.push_back({i,j});\n                break;\n            }\n            i++; j++;\n        }\n        //top right\n        i=kr-1,j=kc+1;\n        while(i>=0 && j<8){\n            if(m.find({i,j})!=m.end()){\n                ans.push_back({i,j});\n                break;\n            }\n            i--; j++;\n        }\n        //bottom left\n        i=kr+1,j=kc-1;\n        while(i<8 && j>=0){\n            if(m.find({i,j})!=m.end()){\n                ans.push_back({i,j});\n                break;\n            }\n            i++; j--;\n        }\n        return ans;\n    }\n};
[]