-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathPangrams.cpp
More file actions
42 lines (34 loc) · 796 Bytes
/
Copy pathPangrams.cpp
File metadata and controls
42 lines (34 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
string s;
getline(cin, s);
vector<bool> temp(26, false);
for(int i = 0; i < s.size(); i++){
if(s[i] >= 65 && s[i] <= 90){
temp[s[i]-'A'] = true;
}
else if(s[i] >= 97 && s[i] <= 122){
temp[s[i]-'a'] = true;
}
}
bool ans = true;
for(int i = 0; i < 26; i++){
if(!temp[i]){
ans = false;
break;
}
}
if(!ans){
cout << "not pangram" << endl;
}
else{
cout << "pangram" << endl;
}
return 0;
}