You don't need a segment tree for this, beats 100%
Intuition\n\nMaintain a sorted map/set of all the obstacles where the key is the coordinate and the value is the maximum space available up until that point.\n\
# Intuition\n\nMaintain a sorted map/set of all the obstacles where the key is the coordinate and the value is the maximum space available up until that point.\n\n# Approach\n\n- We start with 2 dummy obstacles at `0` and `infinity` on the line for convenience.\n- Add new obstacle:\n  - We look up the point where the new obstacle will be and update the subsequent maximum spaces in the map if needed.\n  - Note that the update on average will affect at most a few nodes.\n- Check if block is placeble:\n  - We look up the obstacle just before the `x` value. If there is enough space available either before the obstacle or between the obstacle and `x` we add `true` to the result, otherwise `false`.\n\n# Complexity\n- Time complexity: $$O(N^2*log(N))$$ worst case, $$O(N*log(N))$$ average case.\n\n- Space complexity: $$O(N)$$.\n\nThe solution runtime was `725 ms`. I copypasted one of the segment tree solutions from the discussions, that one took `1111 ms`.\n\n# Code\n```\nclass Solution {\npublic:\n    vector<bool> getResults(vector<vector<int>>& queries) {\n        map<int, int> space = {{0, 0}, {INT_MAX, INT_MAX}};\n        vector<bool> result;\n        for (auto& q : queries) {\n            if (q[0] == 1) {\n                auto c = space.emplace(q[1], -1).first;\n                auto p = prev(c);\n                do {\n                    c->second = max(c->first - p->first, p->second);\n                    p = c++;\n                } while (c != space.end() && c->second != p->second);\n            } else {\n                auto it = prev(space.upper_bound(q[1]));\n                result.push_back(it->second >= q[2] || q[1] - it->first >= q[2]);\n            }\n        }\n        return result;\n    }\n};\n```
['Ordered Map', 'C++']