Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <string>
- #include <map>
- using namespace std;
- ifstream fin("input.txt");
- ofstream out("output.txt");
- int main()
- {
- map<string, int> a;
- vector<string> b;
- while (fin.peek() != EOF)
- {
- string s;
- fin >> s;
- b.push_back(s);
- a[s]++;
- }
- for (int i = 0; i < b.size(); ++i)
- {
- if (a[b[i]] == 1)
- out << b[i] << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement