Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cctype>
- #include <vector>
- using namespace std;
- int main() {
- freopen("input.txt.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- string letters = "abcdefghijklmnopqrstuvwxyz";
- string s;
- vector<int> a(26);
- for(int i = 0; i < a.size(); ++i)
- a[i] = 0;
- for(auto x : a)
- cout << x;
- int n;
- cin >> n;
- cin >> s;
- if (n < 26) {
- cout << "NO";
- return 0;
- }
- else
- for(int i = 0; i < n; i++)
- if (isupper(s[i]))
- s[i] = tolower(s[i]);
- for(int i = 0; s[i]; ++i)
- if(letters.find(s[i]))
- a[122 - int(s[i])] = 1;
- for(auto x : a)
- cout << x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement