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()
- {
- string wt{"abcdefghijklmnopqrstuvwxyz"};
- map<char, ll> z1;
- string fa;
- ll n;
- cin >> n;
- string h;
- while (n-- > 0)
- {
- for (int i = 0; i < 26; i++)
- {
- z1[wt.at(i)] = 0;
- }
- getline(cin >> ws, h);
- for (int i = 0; i < h.length(); i++)
- {
- z1[tolower(h.at(i))] += 1;
- }
- for (auto it : z1)
- {
- if (it.second == 0)
- {
- fa += it.first;
- }
- }
- sort(fa.begin(), fa.end());
- if (fa.size() == 0)
- {
- cout << "pangram" << endl;
- }
- else
- {
- cout << "missing " << fa << endl;
- }
- fa.clear();
- z1.clear();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment