100% faster [Sorting and Map] [C++]
```\nvector maximumBeauty(vector>& items, vector& queries) {\n        sort(items.begin(),items.end());\n        map mp;\n        int maxbeauty=INT_MIN;\n       
```\nvector<int> maximumBeauty(vector<vector<int>>& items, vector<int>& queries) {\n        sort(items.begin(),items.end());\n        map<int,int> mp;\n        int maxbeauty=INT_MIN;\n        for(auto i:items){\n            maxbeauty=max(maxbeauty,i[1]);\n            mp[i[0]]=maxbeauty;\n        }\n        vector<int> ans(queries.size());\n        \n        for(int i=0;i<queries.size();i++){\n\t\t\n            if(mp.find(queries[i])!=mp.end()){\n                ans[i]=mp[queries[i]];\n            }\n\t\t\t\n            else{\n                   auto it = mp.lower_bound(queries[i]);   // In, it=mp.lower_bound(value), it always points on key which is higher than value\n                   if(it!=mp.begin()){\n                              it--;\n                              ans[i]=(*it).second;\n                            }\n                   else ans[i]=0;\n               }\n        }\n        return ans;\n    }
['C']