Jewels and stones

#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t–){
string s,j;
cin>>j>>s;
int a=s.size();
for(int i=0;i<j.size();i++){
if(s.find(j[i])!=string::npos)
s.erase(s.find(j[i]),1);
}
int ans=a-(s.size());
cout<<ans<<"\n";
}
return 0;
}
what’s wrong in the above solution?