B
First, we should delete the in the string , then we use .find()
to check if is a substring of (after delete).
#include<bits/stdc++.h>
using namespace std;
int main() {
string a, a2, b, s = "0123456789+-*|,.~!@#$%^&()[]{}'\";:?<>\\/";
// cout << s;
cin >> a >> b >> a >> b;
for (auto i : a) {
if (s.find(i) == string::npos) a2 += i;
}
if (a2.find(b) != string::npos)cout << "YES";
else cout << "NO";
}