#include #include using namespace std; typedef set string_set; int main() { string s; string_set names; string_set::iterator nit; pair retval; while(getline(cin, s)) { retval = names.insert(s); if (retval.second) { cout << s << ": Successfully inserted.\n"; } else { cout << s << ": Duplicate not inserted.\n"; } } }