Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n ; cin >> n ;
- if (n < 27) cout << "NO" ;
- else {
- string s ; cin >> s ;
- transform(s.begin() , s.end() , s.begin(),::tolower);
- cout << s << "\n" ;
- int freq[n + 1] ;
- for (int i = 0; i < s.size(); i++) freq[s[i] - 'a']++ ;
- bool valid = true ;
- for (int i = 0; i < n + 1; i++)
- if (freq[i] == 0) valid = false ;
- cout << (valid ? "YES" : "NO") ;
- }
Advertisement
Add Comment
Please, Sign In to add comment