Rust | 7ms | beats 100%
Code\nrust []\nimpl Solution {\n    pub fn maximum_beauty(mut items: Vec<Vec<i32>>, queries: Vec<i32>) -> Vec<i32> {\n        items.sort_unstable_by_key(|k| (-k
# Code\n```rust []\nimpl Solution {\n    pub fn maximum_beauty(mut items: Vec<Vec<i32>>, queries: Vec<i32>) -> Vec<i32> {\n        items.sort_unstable_by_key(|k| (-k[1], k[0]));\n        items.dedup_by(|a, b| a[0] >= b[0]);\n        queries\n            .into_iter()\n            .map(|q| match items.binary_search_by_key(&-q, |k| -k[0]) {\n                Ok(i) | Err(i) => items.get(i).map_or(0, |k| k[1]),\n            })\n            .collect()\n    }\n}\n```
['Rust']