Notepad a collection of sheets of paper glued or fastened together at one end

std::multiset

For problems needing logarithmic searching and removing, like concert tickets, std::multiset

multiset<int> tickets;
for {
    auto it = tickets.upper_bound(x)
    if () {
        ..
    }
    else {
        tickets.erase(x)
    }
}