#include<iostream>
#include<set>
#include<string>
using namespace std;
int main()
{
string s;
while(getline(cin,s))
{
if(s=="#")
return 0;
set<string>v;
string stream;
for(int i=0;i<s.size();i++)
{
int times=0;
while(s[i]>='a'&&s[i]<='z')
{
stream+=s[i];
times++;
i++;
}
if(times)
{
v.insert(stream);
stream.clear();
}
}
cout<<v.size()<<endl;
v.clear();
}
return 0;
}
杭电oj 2072 单词数
最新推荐文章于 2024-08-03 18:36:56 发布