Python (35 ms, 98.93 %, 13.9 Mb, 89.29 %)
python\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        # To attack the king, maximal 
``` python\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        # To attack the king, maximal number of queens must be along 8 nearby closet block\n        # Up/Down - Left/Right\n        mapping = set(tuple(queen) for queen in queens)\n        result = []\n        for i, j in ((-1, 0), (1, 0), (0, 1), (0, -1), (-1, -1), (-1, 1), (1, -1), (1, 1)):\n            x, y = king\n            while 0 <= x < 8 and 0 <= y < 8:\n                x += i\n                y += j\n                if (x, y) in mapping:\n                    result.append((x, y))\n                    break\n        return result\n```
[]