mhdew

URI 2653 updated

Jan 9th, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. char a[100000][10000];
  5.  
  6. int main()
  7. {
  8. long long i=0, j, k, count=1, temp;
  9.  
  10. while(scanf("%[^\n]%*c", a[i])!=EOF){
  11. if(i==0){
  12. i++;
  13. continue;
  14. }
  15. for(k=0;k<i;k++){
  16. if(strcmp(a[i],a[k])==0){
  17. temp=0;
  18. break;
  19. }
  20. else
  21. temp=1;
  22. }
  23. if(temp==1)
  24. count++;
  25.  
  26. i++;
  27. }
  28.  
  29. printf("%lld\n", count);
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment