标签:
HDOJ题目地址:传送门
you are my friend #
4
#include<stdio.h> #include<iostream> #include<string> #include<set> using namespace std; int main(){ set<string> st; string s,str; int flag; while(getline(cin,s)){ st.clear(); if(s=="#") break; for(int i=0;i<s.size();i++){ str=""; flag=0; while(s[i]>='a'&&s[i]<='z'){ str+=s[i]; flag=1; i++; } if(flag){ st.insert(str); } } cout<<st.size()<<endl; } }
标签:
原文地址:http://blog.csdn.net/qq_26891045/article/details/52088985