86.74% faster c++ sol
```\nclass Solution {\npublic:\n    vector> queensAttacktheKing(vector>& queens, vector& king) \n     {\n        vector>ans;\n        int i=king[0],j=king[1]-1;
```\nclass Solution {\npublic:\n    vector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) \n     {\n        vector<vector<int>>ans;\n        int i=king[0],j=king[1]-1;\n        /*for left row */\n        while(j>=0)\n        {\n            if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                ans.push_back(vector<int>{i,j});\n                break;\n            }\n        j--;\n            \n        }\n        /* right row*/\n        j=king[1]+1;\n        while(j<8)\n        {\n           if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n               ans.push_back(vector<int>{i,j});\n               break;\n               \n        }\n            j++;\n        }\n        /*up column*/\n        i=king[0]-1;\n        j=king[1];\n        while(i>=0)\n        {\n            if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n            i--;\n        }\n        \n        /* down column*/\n        i=king[0]+1;\n    while(i<8)\n    {\n         if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n        i++;\n        }\n        \n        /*north west diagonal*/\n        i=king[0]-1;\n        j=king[1]-1;\n        while(i>=0&&j>=0)\n        {\n             if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n            i--;\n            j--;\n            \n        }\n        \n        /* north east diagonal*/\n        \n        i=king[0]-1;\n        j=king[1]+1;\n        while(i>=0&&j<8)\n        {\n             if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n            i--;\n            j++;\n            \n        }\n        \n        /* south west diagonal*/\n        \n        i=king[0]+1;\n        j=king[1]-1;            \n            while(i<8&&j>=0)\n            {\n                 if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n                i++;\n                j--;\n                \n            }\n            \n            /* south east diagonal*/\n    i=king[0]+1;\n        j=king[1]+1;\n        while(i<8&&j<8)\n        {\n             if(count(queens.begin(),queens.end(),vector<int>{i,j})==1)\n            {\n                 ans.push_back(vector<int>{i,j});\n                break;\n        }\n            i++;\n            j++;\n            \n        }\n            \n    return ans;\n    }\n};
[]