2070. Most Beautiful Item for Each Query
## 思路
1. 对items排序
2. 更新items的beauty (纪录目前为止的max beauty)
3. Binary Search
## Code
```python
class Solution:
def maximumBeauty(self, items: List[List[int]], queries: List[int]) ->
List[int]:
items.sort()
n = len(items)
for i in range(1, n):
items[i][1] = max(items[i-1][1], items[i][1])
def get_beauty(query):
left, right = 0, n-1
res = 0
while left <= right:
mid = (left + right) // 2
if items[mid][0] <= query:
res = max(res, items[mid][1])
left = mid + 1
elif items[mid][0] > query:
right = mid - 1
return res
return [get_beauty(q) for q in queries]
```