Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <set>
- #include <unordered_set>
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- string word;
- cin >> n;
- set<string> words;
- unordered_set<string> res;
- for (int i = 0; i < n; i++)
- {
- cin >> word;
- if (words.find(word) == words.end())
- words.insert(word);
- else
- res.insert(word);
- }
- if (res.size() != 0)
- for (auto i : res)
- cout << i << endl;
- else
- cout << "Understandable, have a great day" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement