fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--)
  8. {
  9. int n;
  10. cin >> n;
  11. string s;
  12. string a = "Timru";
  13. cin >> s;
  14. sort(s.begin(),s.end());
  15. if(s==a)
  16. {
  17. cout << "YES" << endl;
  18. }
  19. else
  20. {
  21. cout << "NO" << endl;
  22. }
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 5328KB
stdin
1
5
Timur
stdout
YES