1. // Sample code to perform I/O:
  2. #include <stdio.h>
  3.  
  4. int main(){
  5. int num;
  6. scanf("%d", &num);
  7. for(int i=1;i<=num;i++)
  8. {
  9. char str[150];
  10. scanf("%s",str);
  11.  
  12. int f=0,s=0;
  13. int l=0;
  14. for(l=0;str[l]!='\0';++l);
  15. //printf("%d\n",l);
  16. for(int i=0;i<l-3;i++)
  17. {
  18. if(str[i]=='S' && str[i+1]=='U' && str[i+2]=='V' && str[i+3]=='O')
  19. {
  20. if(str[i+4]=='J' && str[i+5]=='I' && str[i+6]=='T')
  21. {
  22. s++;
  23. }
  24. else
  25. {
  26. f++;
  27. }
  28. }
  29. }
  30. printf("SUVO = %d, SUVOJIT = %d\n",f,s);
  31. }
  32. }
  33.  
  34. // Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
  35.  
  36. // Write your code here
Language: C