题解 | 字符串哈希
字符串哈希
https://www.nowcoder.com/practice/dadbd37fee7c43f0ae407db11b16b4bf
#include <iostream> #include <string> #include <unordered_set> using namespace std; int main() { int n; cin >> n; string s; unordered_set<string> hash; while (n--) { cin >> s; hash.insert(s); } cout << hash.size() << endl; return 0; }