//nyoj 5
水题,没有什么难度,只是简单的字符匹配,用的是bf算法,也可以用kmp算法
#include
#include
int main(){
int m,count,i,j;
char s1[1005],s2[1005];
scanf("%d",&m);
while(m--){
i=0;
count=0;
scanf("%s%s",s1,s2);
while(i
j=0;
while(s1[j]==s2[i]&&j
i++;j++;
}//bf字符匹配
if(j==strlen(s1))
count++;
i=i-j+1;
}
printf("%d\n",count);
}
return 0;
}