题解 | #下厨房#
藏宝图
http://www.nowcoder.com/practice/74475ee28edb497c8aa4f8c370f08c30
双指针 #include<bits/stdc++.h> using namespace std; int main() { set<string> material_set; string str; int sum=0; while( cin>>str ) { if( material_set.find( str ) != material_set.end() ) continue; material_set.insert(str); sum++; } cout<<sum<<endl; return 0; }