Using Numpy and Binary Search
Code\n\nfrom numpy import array,arange\nfrom bisect import bisect_left,insort_left\nclass Solution:\n    def getResults(self, queries: List[List[int]]) -> List[
# Code\n```\nfrom numpy import array,arange\nfrom bisect import bisect_left,insort_left\nclass Solution:\n    def getResults(self, queries: List[List[int]]) -> List[bool]:\n        result,obstacles,prev_obstacle_idx,index = [],[0],0,0\n        arr = array([-1] * 50001)\n        arr[0] = 1\n        for q in queries:\n            x = q[1]\n            if len(obstacles) == 1:\n                prev_obstacle_idx = obstacles[0]\n            else:\n                index = bisect_left(obstacles,x)            \n                if index > 0:\n                    prev_obstacle_idx = obstacles[index-1]\n            if q[0] == 1:\n                arr[x] = 1\n                arr[prev_obstacle_idx+1:x] = arange(len(arr[prev_obstacle_idx+1:x])+1,1,-1)\n                insort_left(obstacles,x)\n            else:\n                sz = q[2]\n                dist = x - prev_obstacle_idx\n                if prev_obstacle_idx == 0:\n                    prev_obstacle_idx = 1\n                result.append(max(dist,arr[:prev_obstacle_idx].max()) >= sz)     \n        return result\n```
['Python3']