Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstring>
- #include <cstdlib>
- #include <algorithm>
- #include <iostream>
- using namespace std;
- int main()
- {
- int t_case, t = 1;
- string ch1;
- string ch2;
- cin >> t_case;
- char c;
- c = getchar();
- while(t_case--)
- {
- getline(cin, ch1, '\n');
- getline(cin, ch2, '\n');
- // cout << ch1 << endl << ch2 << endl;
- ch1.erase(remove(ch1.begin(), ch1.end(), ' '), ch1.end());
- ch2.erase(remove(ch2.begin(), ch2.end(), ' '), ch2.end());
- transform(ch1.begin(), ch1.end(), ch1.begin(), ::tolower);
- transform(ch2.begin(), ch2.end(), ch2.begin(), ::tolower);
- sort(ch1.begin(), ch1.end());
- sort(ch2.begin(), ch2.end());
- if(ch1 == ch2)
- printf("Case %d: Yes\n", t++);
- else
- printf("Case %d: No\n", t++);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement