Getting wrong answer in string

here is the link of the code

and this is my code
can u please tell what am i doing wrong
#include
#include
#include
using namespace std;
int main(){
int t;
cin>>t;
for(int i=0;i<t;i++){
int count=0;
if(i==0){
string extra;
getline(cin,extra);
}
string s1,s2;
getline(cin,s1);
getline(cin,s2);
sort(s2.begin(),s2.end());
sort(s1.begin(),s1.end());
string s3=s1;
string s4=s2;
for(int j=0;j<s1.length();j++){
bool check=true;
for(int k=0;k<s2.length();k++){
if(s1[j]==s4[k]){
s4=s4.substr(1);
check=true;
break;
}
else
check=false;
}
if(check==false)
count++;
}
for(int j=0;j<s2.length();j++){
bool check=true;
for(int k=0;k<s1.length();k++){
if(s2[j]==s3[k]){
s3=s3.substr(1);
check=true;
break;
}
else
check=false;
}
if(check==false)
count++;
}
cout<<count<<"\n";
}
}