|
|
back to boardс++ #include <iostream> #include <string> #include <unordered_set> int main() { std::ios::sync_with_stdio(false); std::size_t N; std::size_t res {0}; std::cin >> N; std::string str; std::getline (std::cin, str); std::unordered_set<std::string> dictionary; while (N--) { std::getline (std::cin, str); if (dictionary.find(str) == std::cend(dictionary)) dictionary.insert (str); else res++; } std::cout << res << std::endl; } |
|
|