ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1563. Bayan

What wrong whith my prog: WA test #1
Posted by XMAN 14 Nov 2009 03:32
Please help;
Here my prog:
#include<stdio.h>
#include<string.h>
int main()
{
    int n,i,j,cmp=0;
    char t[1001][31],c;
    scanf("%d",&n);
     for(i=0;i<n;i++)
     gets(t[i]);
   for(i=0;i<n;i++)

     for(j=0;j<i;j++)
     {if(strcmp(t[i],t[j])==0)
        {cmp++;break;}
     }
   printf("%d",cmp);
return 0;
}