Finding number of Distinct Strings in given 'N' strings

Given N strings, find out the number of distinct strings among those strings.


Implementation:


#include <stdio.h>
#define MAX 1000
int main()
{
      long int N,count=0,i,j;
      char string[MAX][1000];
      scanf("%ld",&N);
      if(N==1)
      printf("%d",1);
      for(i=0;i<N;i++)
      {
           scanf("%s",string[i]);
      }
      for(i=0;i<N;i++)
      {
           for(j=i+1;j<N;j++)
           {
                if(strcmp(string[i],string[j]))
                continue;
                else
                count++;
           }
      }
      printf("%ld",N-count);
      return 0;
}