题目链接:HDU2072
题目意思:求每一行不同单词数
解题思路:利用STL中的set保存取到的单词输出set.size()
Code:
#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<set>
using namespace std;
int main()
{
set<string> Set;
char c;
while((c=getchar())!='#')
{
题目链接:HDU2072
题目意思:求每一行不同单词数
解题思路:利用STL中的set保存取到的单词输出set.size()
Code:
#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<set>
using namespace std;
int main()
{
set<string> Set;
char c;
while((c=getchar())!='#')
{