fork download
  1. #include <iostream>
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int t;
  8. cin>>t;
  9. while(t--)
  10. {
  11. string s,t;
  12. cin>>s>> t;
  13. sort(s.begin(),s.end());
  14. sort(t.begin(),t.end());
  15. if(s==t)
  16. cout<<"true"<<"\n";
  17. else
  18. cout<<"false"<<"\n";
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 5456KB
stdin
4
a a
b h
stop post
hi hey
stdout
true
false
true
false