Untitled
unknown
plain_text
2 years ago
852 B
0
Indexable
Never
#include <iostream> #include <string> using namespace std; int main() { string str; char alphabetSmall[26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; char result[26]{}; int n; int flag = 0; cin >> n; cin >> str; for (int i = 0; i < n; i++) { for (int j = 0; j < 26; j++) { if (alphabetSmall[j] == str[i] || (alphabetSmall[j] - 32) == str[i]) { result[j] = str[i]; break; } } } for (int i = 0; i < 26; i++) { if (result[i] == 0) { cout << "NO" << endl; flag = 1; break; } } if (flag == 0) cout << "YES" << endl; }