Skip to content

Instantly share code, notes, and snippets.

@lectricas
Created March 23, 2021 22:02
Show Gist options
  • Save lectricas/4d65fcf0a8ac1a80ff42e11d956c6e8a to your computer and use it in GitHub Desktop.
Save lectricas/4d65fcf0a8ac1a80ff42e11d956c6e8a to your computer and use it in GitHub Desktop.
#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