ICPC NAQ 2015 F - Quick Brown Fox

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 1G

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
ICPC North America Qualifier 2015, Problem F

A pangram is a phrase that includes at least one occurrence of each of the 26 letters, a \dots z. You're probably familiar with this one:

The quick brown fox jumps over the lazy dog.

Your job is to recognize pangrams. For phrases that don't contain every letter, report what letters are missing. We'll say that a particular letter occurs in the phrase if it occurs as either upper case or lower case.

Input Specification

Input starts with a line containing an integer 1 \le N \le 50. The next N lines are each a single phrase, possibly containing upper and lower case letters, spaces, decimal digits and punctuation characters ., ,, ?, !, ' and ". Each phrase contains at least one and no more than 100 characters.

Output Specification

For each input phrase, output pangram if it qualifies as a pangram. Otherwise, output the word missing followed by a space and then the list of letters that didn't occur in the phrase. The list of missing letters should be reported in lower case and should be sorted alphabetically.

Sample Input

3
The quick brown fox jumps over the lazy dog.
ZYXW, vu TSR Ponm lkj ihgfd CBA.
.,?!'" 92384 abcde FGHIJ

Sample Output

pangram
missing eq
missing klmnopqrstuvwxyz
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

Comments

There are no comments at the moment.