Cod sursa(job #3152733)
Utilizator | Data | 26 septembrie 2023 17:16:50 | |
---|---|---|---|
Problema | Flux maxim | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.46 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a, b, c;
cin >> a >> b >> c;
string ab = a + b;
sort(ab.begin(), ab.end());
sort(c.begin(), c.end());
int n = ab.size(), m = c.size();
if (n != m) {
cout << "NO";
return 0;
}
for (int i = 0; i < n; i++)
if (ab[i] != c[i]) {
cout << "NO";
return 0;
}
cout << "YES";
return 0;
}