Source Code
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    string s,ans="ABCDEFGHIJKLM";
    cin >> t;
    while (t--) {
        cin >> s;
        sort(s.begin(),s.end());
        if ( s == ans ) cout << "YES\n";
        else cout << "NO\n";
    }
}
Copy
Well-indexed? MOohamed_Mahfouz
GNU G++17
29 ms
528 KB
Accepted