标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 44427 Accepted Submission(s): 10840
#include<iostream> #include<sstream> #include<set> #include<string> using namespace std; int main() { string s ; while(getline(cin,s)&&s!="#") { istringstream cin(s); set<string>words; string w; while(cin>>w) words.insert(w); cout<<words.size()<<endl; } }
标签:
原文地址:http://www.cnblogs.com/wangmenghan/p/5679628.html