Editorial for ICPC NAQ 2016 A - A New Alphabet


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
  • Manually convert the translation table to code. E.g. a function that takes a single character, and returns the translated character by
    • checking a sequence of if statements,
    • using one large switch statement, or
    • querying a map data structure.
  • Uppercase letters should be translated to the same character as their lowercase counterparts. This can be handled by
    • creating a second translation table for uppercase letters, or
    • converting uppercase letters to lowercase letters by using a library function, or by manipulating their underlying ASCII values.
  • Finally a single pass through the text, outputting the translated characters.

Comments

There are no comments at the moment.