题解 | #下厨房#
下厨房
http://www.nowcoder.com/practice/ca5c9ba9ebac4fd5ae9ba46114b0f476
菜狗决定改过自新重新做人
#include<stdio.h> #include<string> #include<unordered_map> #include<iostream> using namespace std; int main() { unordered_map<string, int> mp; string str; while(cin >> str) { mp[str] ++; } int count = 0; for(auto elem : mp) { count ++; } printf("%d\n", count); return 0; }