标签:style os 数据 for 问题 ar div new
#include #include int main()
{
char c,str[1000][1000],
flag = 0,count; int x,y,i,j;
while(1) { x = 0; y = 0;
while((c = getchar() )!= ‘\n‘)
{
if (c == ‘#‘)
{
flag = 1; break;
}
if (c != ‘ ‘&&c!=‘\0‘)
{ str[x][y++] = c; }
else { str[x][y] = ‘\0‘;
y = 0; x++;
}
}
if(flag)
{ break; }
count = 0;
for (i = 0;i <= x;i++)
{
if(str[i][0])
{
count++;
for(j = i + 1;j <= x;j++)
{
if(strcmp(str[i],str[j]) == 0)
{
str[j][0] = ‘\0‘;
}
}
}
}
printf("%d\n",count);
}
return 0;
}
标签:style os 数据 for 问题 ar div new
原文地址:http://www.cnblogs.com/luzhongshan/p/3880260.html