My solution....
Explanation \n\n1. Sorting the Items:\n   - The items list is sorted by price, so we can keep track of the maximum beauty for each price threshold as we iterate
# Explanation \n\n1. **Sorting the Items**:\n   - The `items` list is sorted by price, so we can keep track of the maximum beauty for each price threshold as we iterate.\n\n2. **Tracking Maximum Beauty**:\n   - `maxb` keeps the maximum beauty seen so far as we iterate through `items`. This allows us to record the best beauty achievable at each price level.\n   - Each `(price, max beauty so far)` tuple is appended to the list `b`.\n\n3. **Binary Search on Queries**:\n   - For each query price, `bisect_right` is used on `b` to find the index of the highest price that does not exceed the query price.\n   - `b[idx][1]` retrieves the maximum beauty at that index. If no prices are less than or equal to the query price, we return `0`.\n\n# Complexity\n- Time complexity:\nO(nlogn+mlogn)\n\n- Space complexity:\nO(n+m)\n\n# Code\n```python3 []\nclass Solution:\n    def maximumBeauty(self, items: List[List[int]], queries: List[int]) -> List[int]:\n        items.sort()\n        b = []\n        maxb = 0\n        for price, beauty in items:\n            maxb = max(maxb, beauty)\n            b.append((price, maxb))\n        \n        res = []\n        for q in queries:\n            idx = bisect_right(b, (q, float(\'inf\'))) - 1\n            res.append(b[idx][1] if idx >= 0 else 0)\n        return res\n\n```
['Python3']