知识需要灵活运用

#include<iostream>  
#include<string>  
#include<algorithm>  
using namespace std;  
int main()  
{  
    string a,b,c;  
    cin>>a>>b>>c;  
    a+=b;  
    sort(a.begin(),a.end());  
    sort(c.begin(),c.end());  
    if(a==c)  
        printf("YES\n");  
    else  
        printf("NO\n");  
    return 0;  
}

在STL里,begin,end太重要了

猜你喜欢

转载自blog.csdn.net/weixin_43238423/article/details/91126599