Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- string word1, word2;
- map<char, int> m1, m2;
- while (cin >> word1 >> word2) {
- for (const char& c : word1) {
- ++m1[c];
- }
- for (const char& c : word2) {
- ++m2[c];
- }
- if (m1 == m2) cout << "YES\n";
- else cout << "NO\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement