mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ddd34a4f1c
2000-2099
34 lines
693 B
C++
34 lines
693 B
C++
#include<map>
|
|
#include<string>
|
|
#include<iostream>
|
|
using namespace std;
|
|
int main(){
|
|
string s;
|
|
map<string,int>Map;
|
|
while(getline(cin,s)&&s!="#")
|
|
{
|
|
int a=0;
|
|
string str;
|
|
Map.clear();
|
|
int len=s.length();
|
|
for(int i=0;i<len;i++){
|
|
if(s[i]=='#')
|
|
break;
|
|
str.clear();
|
|
while(s[i]>='a'&&s[i]<='z'){
|
|
str+=s[i];
|
|
i++;
|
|
a=1;
|
|
}
|
|
if(a==1)
|
|
{
|
|
Map[str]++;
|
|
a=0;
|
|
}
|
|
}
|
|
int ans=Map.size();
|
|
cout<<ans<<endl;
|
|
}
|
|
return 0;
|
|
}
|