You are viewing a single comment's thread. Return to all comments →
int main() {
int n1,n2,i,count=0,j,s; char str1[10000][20],str2[10000][20]; scanf("%d",&n1); for(j=0;j<n1;j++) { scanf("%s",str1[j]); } scanf("%d",&n2); for(i=0;i<n2;i++) { scanf("%s",str2[i]); } for(i=0;i<n2;i++) { count=0; for(j=0;j<n1;j++){ s=strcmp(str2[i],str1[j]); if(s==0) { count=count+1; } } printf("%d\n",count); } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
int main() {
}