1. class Solution {
    2. public:
    3. bool escapeGhosts(vector<vector<int>>& ghosts, vector<int>& target) {
    4. int steps = abs(target[0]) + abs(target[1]);
    5. for (auto ghost : ghosts) {
    6. if (abs(ghost[0] - target[0]) + abs(ghost[1] - target[1]) <= steps)
    7. return false;
    8. }
    9. return true;
    10. }
    11. };