My issue
My code
#include <bits/stdc++.h>
#include<string>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
string m,w;
cin>>m>>w;
unsigned int min=0;
if(m.length()>=w.length())
{
min=w.length();
}
else{
min=m.length();
}
unsigned int count=0;
for( size_t i=0;i<m.length();i++)
{
for( size_t j=0;j<w.length();j++)
{
if(m[i]==w[j])
{
count++;
break;
}
}
}
if(count==min)
{
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
return 0;
}
Problem Link: NAME2 Problem - CodeChef