• Source
    1. #include <iostream>
    2. #include <string>
    3. #include <vector>
    4. using namespace std;
    5. int main()
    6. {
    7. string s;
    8. getline(cin,s);
    9. vector<bool> mark(26,false);
    10. int count=0;
    11. for(int i=0;i<s.size();++i)
    12. {
    13. if( (s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z'))
    14. {
    15. s[i]=tolower(s[i]);
    16. if(mark[s[i]-'a']==false)
    17. {
    18. mark[s[i]-'a']=true;
    19. ++count;
    20. }
    21. }
    22. }
    23. if(count==26)
    24. cout<<"pangram";
    25. else
    26. cout<<"not pangram";
    27. }