Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <set>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- string name;
- set<string> names;
- for (int i = 0; i < n; i++) {
- cin >> name;
- names.insert(name);
- }
- for (auto& n : names) {
- cout << n << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement