标签:bsp nbsp main 知识 begin int col lower color
#include <iostream> #include <set> using namespace std; int main() { set<int> s; s.insert(1); s.insert(2); s.insert(3); s.insert(1); s.insert(0); set<int>::iterator it; // mo ren pai xu; for(it = s.begin(); it != s.end(); it++) cout<<*it<<" "; cout<<endl; cout<<s.size()<<endl; s.clear(); cout<<s.size()<<endl; s.insert(1); s.insert(2); s.insert(3); s.insert(5); s.insert(4); for(it = s.begin(); it != s.end(); it++) cout<<*it<<" "; cout<<endl; s.erase(4); for(it = s.begin(); it != s.end(); it++) cout<<(*it)<<" "; cout<<endl; it=s.lower_bound(3); cout<<*it<<endl; while(!s.empty()) { cout<<" long de "<<endl; s.clear(); } }
标签:bsp nbsp main 知识 begin int col lower color
原文地址:https://www.cnblogs.com/Andromeda-Galaxy/p/9512314.html