#include <iostream>
#include <queue>
struct Bill {
Bill(const std::string &_name, int _value) : name(_name), value(_value) { }
std::string name;
int value;
bool operator<(const Bill &other) const {
return value < other.value;
}
};
int main(int argc, char **argv) {
Bill one("$1", 1);
Bill five("$5", 5);
Bill ten("$10", 10);
Bill twenty("$20", 20);
std::priority_queue<Bill> bills;
bills.push(five);
bills.push(one);
bills.push(ten);
bills.push(twenty);
while(!bills.empty()) {
std::cout << bills.top().name << " ";
bills.pop();
}
std::cout << "\n";
return 0;
}