Created
March 23, 2021 22:02
-
-
Save lectricas/4d65fcf0a8ac1a80ff42e11d956c6e8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// | |
// Created by lectr on 24.03.2021. | |
// | |
#include <unordered_map> | |
#include <string> | |
int main() { | |
int n; | |
std::unordered_map<std::string, int> map; | |
std::cin >> n; | |
for (int i = 0; i < n; i++) { | |
std::string a; | |
std::getline(std::cin, a); | |
if (map.find(a) == map.end()) { | |
std::cout << a << "\n"; | |
map[a] = 1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment