fork download
  1.  
  2. #include <iostream>
  3. #include <cmath>
  4. #include <cstdio>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <string>
  8. #include <map>
  9. #include <cctype>
  10. using namespace std;
  11.  
  12.  
  13. int main() {
  14. map<char,int> count;
  15. map<char,int>::iterator it;
  16. string s1;
  17. getline(cin,s1);
  18. for(int i=0;i<s1.length();i++){
  19. count[tolower(s1.at(i))]++;
  20.  
  21. }
  22. for(char ch='a';ch<='z';ch++){
  23.  
  24. if(count[ch]==0){
  25. cout<<"not pangram";
  26. return 0;
  27. }
  28.  
  29. }
  30. if(count[' '] == 0){
  31. cout<<"not pangram" ;
  32. return 0;
  33. }
  34. cout<<"pangram";
  35.  
  36. return 0;
  37. }
Success #stdin #stdout 0s 3420KB
stdin
qwertyuio pasdfghjklzxcvbnm ASDFHJ srfjrs
stdout
pangram