Python3. Stacks. Without inserting to sorted lists.
\nclass Solution:\n    def closestRoom(self, rooms: List[List[int]], queries: List[List[int]]) -> List[int]:\n        queries = [tuple(q) for q in queries]\n   
```\nclass Solution:\n    def closestRoom(self, rooms: List[List[int]], queries: List[List[int]]) -> List[int]:\n        queries = [tuple(q) for q in queries]\n        queries_copy = list(queries)\n        rooms.sort()\n        queries.sort()\n\t\t# stack of rooms with increasing id and decreasing size\n        stack = []\n        i = 0\n        res_cache = {}\n        \n        def binary_search(min_size):\n            low = 0\n            high = len(stack) - 1\n            while low <= high:\n                mid = (low + high + 1) // 2\n                if stack[mid][1] < min_size:\n                    high = mid - 1\n                elif low == mid:\n                    return low\n                else:\n                    low = mid\n            return -1\n        \n\t\t# search the best to the left from prefered position\n        for q in queries:\n\t\t    # add all rooms to the left from query prefered postion (q[0]) to the stack\n            while i < len(rooms) and q[0] >= rooms[i][0]:\n\t\t\t    # discard all rooms that are farther than `rooms[i]` and have smaller size\n                while stack and rooms[i][1] >= stack[-1][1]:\n                    stack.pop()\n                stack.append(rooms[i])\n                i += 1\n                \n\t\t\t# best room fit to the left from `rooms[i]`\n            room_index = binary_search(q[1])\n            res_cache[q] = stack[room_index][0] if room_index != -1 else -1\n        \n        i = 0\n        stack = []\n        rooms.reverse()\n        queries.reverse()\n\t\t#  search the best to the right from prefered position\n        for q in queries:\n\t\t    # add all rooms to the right from query prefered postion `q[0]` to the stack\n            while i < len(rooms) and q[0] <= rooms[i][0]:\n\t\t\t    # discard all rooms that are farther than `rooms[i]` and have smaller size\n                while stack and rooms[i][1] >= stack[-1][1]:\n                    stack.pop()\n                stack.append(rooms[i])\n                i += 1\n\n\t\t\t# best room fit to the right from `rooms[i]`\n            room_index = binary_search(q[1])\n            if room_index != -1 and (res_cache[q] == -1 or q[0] - res_cache[q] > stack[room_index][0] - q[0]):\n                res_cache[q] = stack[room_index][0]\n                \n        return [res_cache[q] for q in queries_copy]\n```
[]