<span style="font-size:18px;"><strong>#include <iostream>
#include <set>
#include <string>
using namespace std;
int main()
{
set<string> st;
string s;
char c;
while ((c = cin.get()) != '#')
{
if(c != ' ') s += c;
while (c != '\n')
{
while ((c = cin.get()) != ' ' && c != '\n')
s += c;
if (s.length())
st.insert(s);
s = "";
}
cout << st.size() << endl;
st.clear();
}
return 0;
}</strong></span>
hdu_2072_单词数
最新推荐文章于 2019-03-11 16:17:29 发布