#include <iostream>
#include <map>
#include <functional>
int main() {
std::map<double,int,std::greater<double>> list;
list.emplace(100,1);
list.emplace(0,2);
list.emplace(2.71,3);
list.emplace(3.14,4);
list.emplace(1.41,5);
for(auto &v : list){
std::cout << "number:" << v.second << " score:" << v.first << std::endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KCmludCBtYWluKCkgewoJc3RkOjptYXA8ZG91YmxlLGludCxzdGQ6OmdyZWF0ZXI8ZG91YmxlPj4gbGlzdDsKCWxpc3QuZW1wbGFjZSgxMDAsMSk7CglsaXN0LmVtcGxhY2UoMCwyKTsKCWxpc3QuZW1wbGFjZSgyLjcxLDMpOwoJbGlzdC5lbXBsYWNlKDMuMTQsNCk7CglsaXN0LmVtcGxhY2UoMS40MSw1KTsKCQoJZm9yKGF1dG8gJnYgOiBsaXN0KXsKCQlzdGQ6OmNvdXQgPDwgIm51bWJlcjoiIDw8IHYuc2Vjb25kIDw8ICIgc2NvcmU6IiA8PCB2LmZpcnN0IDw8IHN0ZDo6ZW5kbDsKCX0KCQoJcmV0dXJuIDA7Cn0=