Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll = long long;
- int main()
- {
- ll n;
- cin >> n;
- string a;
- char hl;
- while (n-- > 0)
- {
- vector<ll> z1(26);
- getline(cin >> ws, a);
- for (int i = 0; i < a.length(); i++)
- {
- hl = tolower(a.at(i));
- if (hl >= 'a' && hl <= 'z')
- {
- z1.at(hl - 97) += 1;
- }
- }
- int x = count(z1.begin(), z1.end(), 0);
- if (x == 0)
- {
- cout << "pangram" << endl;
- }
- else
- {
- cout << "missing ";
- for (int j = 0; j < 26; j++)
- {
- if (z1.at(j) == 0)
- {
- cout << char(j + 97);
- }
- }
- cout << endl;
- }
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment