forked from Vicfred/codeforces-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pangram_520A.rs
48 lines (37 loc) · 941 Bytes
/
pangram_520A.rs
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
43
44
45
46
47
48
// https://codeforces.com/problemset/problem/520/A
// basic string manipulation, set
use std::io;
use std::collections::HashSet;
fn main() {
io::stdin()
.read_line(&mut String::new())
.unwrap();
let mut line = String::new();
io::stdin()
.read_line(&mut line)
.unwrap();
let mut line: String = line
.trim()
.to_string();
line.make_ascii_lowercase();
let mut letters = HashSet::new();
for ch in line.chars() {
letters.insert(ch);
}
let alphabet = "abcdefghijklmnopqrstuvwxyz";
let mut flag = true;
for ch in alphabet.chars() {
match letters.get(&ch) {
Some(_) => continue,
None => {
flag = false;
break;
},
}
}
if flag {
println!("YES");
} else {
println!("NO");
}
}