题解 | #字符串字符匹配#
字符串字符匹配
https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
string a,b,n;
cin>>a>>b;
for(auto c:a)
{
int m=0;
m=count(b.begin(),b.end(),c);
if(m!=0)
n=n+c;
}
if(n==a)
{
cout<<"true";
}
else{
cout<<"false";
}
}
// 64 位输出请用 printf("%lld")
