Source Code
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;

void solve() {
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  for (int i = 0 ; i < 13 ; i++) {
    if (s[i] != 'A' + i) {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES" << endl;
}

int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }

  return 0;
}
Copy
Well-indexed? CPX99
GNU G++17
53 ms
644 KB
Accepted