📅  最后修改于: 2022-03-11 14:44:47.757000             🧑  作者: Mango
//Method 1:
set:: iterator it;
for( it = s.begin(); it != s.end(); ++it){
int ans = *it;
cout << ans << endl;
}
//Method 2:
for( auto& it : s) {
cout << it << " ";
}