题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2072
#include<iostream>
#include<cstdio>
#include<sstream>
#include<set>
using namespace std;
set<string> words;
string str,w;
int main(){
while(getline(cin,str)&&(str!="#")){
istringstream sin(str);
words.clear();
while(sin>>w){
words.insert(w);
}
cout<<words.size()<<endl;
}
return 0;
}