My issue
help
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int i,j,s,r,t,n,k;
int one,ones,zero,zeroes;
cin>>t;
for(i=0;i<t;i++){
cin>>n;
string s,r;
cin>>s>>r;
for(j=0;j<n;j++){
if(s[j]=='1'){
one++;
}
else{
zero++;
}
for(k=0;k<n;k++){
if(r[k]=='1'){
ones++;
}
else{
zeroes++;
}
}
}
}
if(one==ones){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
}
Problem Link: Playing with Strings Practice Coding Problem