Seems like a  set<int> would make more sense.