2072
见解
1.set与map
set类似vector,但是相同的无法insert
map是一个匹配方式,可以通过string等搜寻信息,需要两个——关于map
2.stringstream方便解题
#include <iostream>
#include <sstream>
#include <set>
#include <string>
using namespace std;
int main()
{
set<string> words;
string a = "", b;
while(getline(cin, a))
{
if(a == "#") break;
stringstream inword(a);
while(inword>>b)
{
words.insert(b);
//cout<<b<<words.size();
}
cout<<words.size()<<endl;
words.clear();
}
return 0;
}