C++ solution
\nstatic bool fast = []()\n{\n    std::cin.tie(0)->sync_with_stdio(false);\n    return true;\n}();\n\nclass Solution\n{\npublic:\n    int minRectanglesToCoverPo
```\nstatic bool fast = []()\n{\n    std::cin.tie(0)->sync_with_stdio(false);\n    return true;\n}();\n\nclass Solution\n{\npublic:\n    int minRectanglesToCoverPoints(vector<vector<int>>& points, int w)\n    {\n        std::vector<int> columns;\n        \n        {\n            std::unordered_set<int> us;\n            for (const std::vector<int>& point : points)\n            {\n                if (us.find(point[0]) == us.end())\n                {\n                    columns.push_back(point[0]);\n                    us.insert(point[0]);\n                }\n            }\n        }\n\n        std::sort(columns.begin(), columns.end());\n\n        int res = columns.size();\n        int left = 0;\n        for (int i = 1; i < columns.size(); i++)\n        {\n            if (columns[i] - columns[left] <= w)\n            {\n                res--;\n            }\n            else\n            {\n                left = i;\n            }\n        }\n\n        return res;\n    }\n};\n```
['C++']