-
Notifications
You must be signed in to change notification settings - Fork 2
quickbrownfox
bradendubois edited this page Sep 10, 2021
·
9 revisions
ID: quickbrownfox
Difficulty: 1.6
CPU Time: 1 second
Memory: 1024 MB
For this problem, one can read each line, and keep a mapping of a letter in the line to the number of its occurrences (incrementing the appropriate one at each read in character, if it is a letter), and then iterate through the alphabet and check each character in it to ensure its occurrences in the map previously created is > 0, if not, output the character. If there were no misses, output "pangram".
This is the first problem I've encountered where something quick like cin >> str
is not sufficient to read in a line, since it would read in word by word, something like getline(cin, str)
is required.