Source Code
#include <bits/stdc++.h>
typedef long long ll;
#define InAHurry cin.tie(0)->sync_with_stdio(0);
using namespace std;
int main(){
    InAHurry;
    int t;
    cin>>t;
    string s, ss="ABCDEFGHIJKLM";
    while(t--){
        cin>>s;
        sort(s.begin(),s.end());
        if(s == ss)
        cout<<"YES\n";
        else
        cout<<"NO\n";
    }
      
    return 0;
}
Copy
Well-indexed? rama
GNU G++17
4 ms
524 KB
Accepted