#include <iostream>
#include <set>
using namespace std;
void printSet (set<int> s)
{
for (set<int>::iterator it = s.begin(); it != s.end(); it ++)
{
cout << *it << " ";
}
cout << endl;
}
void test01 ()
{
set<int> s1;
pair<set<int>::iterator, bool> ret = s1.insert(1);
if (ret.second)
{
cout << "first insert succeed" << endl;
}
else
{
cout << "first insert failed" << endl;
}
ret = s1.insert(1);
if (ret.second)
{
cout << "second insert succeed" << endl;
}
else
{
cout << "second insert failed" << endl;
}
multiset<int> ms;
ms.insert(10);
ms.insert(10);
for (multiset<int>::iterator it = ms.begin(); it != ms.end(); it ++)
{
cout << *it << " ";
}
cout << endl;
}
int main ()
{
test01();
return 0;
}