#include"stdio.h"
#include"string.h"
int main()
{
char str[102],word[1000][102];
int i = 0;
while(scanf("%s",&word[i]) != EOF)
{
int i = 0,j,len;
int num = 0;
do{
int temp = 0;
len = strlen(word[i]);
if(strcmp(word[i],"#") == 0)
break;
if(word[i][len-1] == '#')
{
word[i][len-1] = '\0';
i++;
for(j = 0; j < i - 1; j++)
{
if(strcmp(word[i-1],word[j]) != 0)
temp++;
}
if(temp == i - 1)
num++;
break;
}
i++;
for(j = 0; j < i - 1; j++)
{
if(strcmp(word[i-1],word[j]) != 0)
temp++;
}
if(temp == i - 1)
num++;
}while((scanf("%s",&word[i]) != EOF) != EOF);
printf("%d\n",num);
}
return 0;
}
一直WA,不知道错在哪