Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7. int n;
  8. cin >> n;
  9. string r[n];
  10. string s, t;
  11. for (int i = 0; i < n; ++i){
  12. cin >> s >> t;
  13. sort(s.begin(), s.end());
  14. sort(t.begin(), t.end());
  15. if (s == t) r[i] = "yes";
  16. else r[i] = "no";
  17. }
  18. for (int i = 0; i < n; ++i){
  19. cout << r[i] << endl;
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement