- // Sample code to perform I/O:
- #include <stdio.h>
-
- int main(){
- int num;
- scanf("%d", &num);
-
- for(int i=1;i<=num;i++)
- {
- char str[150];
- scanf("%s",str);
-
- int f=0,s=0;
- int l=0;
- for(l=0;str[l]!='\0';++l);
- //printf("%d\n",l);
- for(int i=0;i<l-3;i++)
- {
- if(str[i]=='S' && str[i+1]=='U' && str[i+2]=='V' && str[i+3]=='O')
- {
- if(str[i+4]=='J' && str[i+5]=='I' && str[i+6]=='T')
- {
- s++;
- }
- else
- {
- f++;
- }
- }
- }
- printf("SUVO = %d, SUVOJIT = %d\n",f,s);
- }
- }
-
- // Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
-
- // Write your code here
Language: C