C++ || Segment Tree + Ordered Set 
Code

# Code
```cpp []
class SegmentTree {
    public:
        int size;
        vector<int> tree;
        SegmentTree(int n){
            size = n;
            tree = vector<int>(2*n+2);
        }
        void update(int index,int x){
            index += size;
            tree[index] = x;
            while(index > 1){
                index /=2;
                tree[index] = max(tree[2*index],tree[2*index+1]);
            }
        }
        int query(int left,int right){
            left += size;
            right += size;
            right++;
            int ans = 0;
            while(left<right){
                if(left&1)
                    ans = max(ans,tree[left++]);
                if(right&1)
                    ans = max(ans,tree[--right]); 
                left /=2;
                right /=2;
            }
            return ans;
        }
};
class Solution {
public:
    vector<bool> getResults(vector<vector<int>>& queries) {
        int maxN = 1e5;
        SegmentTree segTree(maxN);
        
        set<int> obstacles;
        obstacles.insert(0);
        obstacles.insert(maxN);

        vector<bool> ans;

        for(auto &q:queries){
            int queryType = q[0];
            int x = q[1];
            if(queryType == 1){
                auto itr = obstacles.upper_bound(x);
                int left = *prev(itr);
                int right = *itr;
                obstacles.insert(x);
                segTree.update(x,x - left);
                if (right != maxN) {
                    segTree.update(right, right - x);
                }
            }
            else{
                int blockSize = q[2];
                int maxBlockSize = segTree.query(0,x);
                bool canPlace = maxBlockSize >= blockSize;
                if(!canPlace){
                    auto itr = obstacles.lower_bound(x);
                    if(*itr!=x){
                        int left = *prev(itr);
                        canPlace = (x - left) >= blockSize;
                    }
                }
                ans.push_back(canPlace);
            }
        }
        return ans;
    }
};
```
['Segment Tree', 'Ordered Set', 'C++']