OJ这个被判为答案错误50%,有什么毛病呢?

img


#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s,p;
    getline (cin,s);
    getline (cin,p);
    
    int x = 0;
    int a = s.length() ; 
    int b = p.length() ;
    for(int i =0 ; i < b ; i++)
    {
        for(int j = 0 ; j < a ; j++)
        {
            if(s[j]==p[i])
            {
                x += 1;
                break;
            }
        }
    }
    
    if(x == b)
    cout <<"Yes"<<endl;
    else
    cout <<"No"<<endl;
    
    return 0;
}

谢谢

是不是因为在s里比较过的就不能在比较了

img