Problem 2186. GJam 2012 Qualifier: Tongues
This Challenge is a Warm-Up for Google Code Jam 2014 Qualifying round coming up on April 11, 2014. Registration starts March 11, 2014. The Google site has many practice cases with input validation check.
This Challenge is Tongues from 2012 Qualifier, an alphabet substitution. The "Googlerese" needs to be translated back to normal. Normal to G samples are 'a' -> 'y', 'o' -> 'e', and 'z' -> 'q'. This means that "a zoo" will become "y qee" in G.
Additional samples of G to Normal to determine translation are:
ejp mysljylc kd kxveddknmc re jsicpdrysi rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd de kr kd eoya kw aej tysr re ujdr lkgc jv to: our language is impossible to understand there are twenty six factorial possibilities so it is okay if you want to just give up
Input: str of G
Output: str of translated letters
Google Code Jam Notes: The contest entry format is very strict and requires a little practice with fprintf. The data formats are 1980 vintage FORTRAN based. The usage of fgetl, fscanf, and dlmread may be used based upon data set. My preference is to read the Data set into a cell array and then loop over the processing as a function call with a line of output per call. I plan to post sets of input read and output write models.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
6830 Solvers
-
Return the largest number that is adjacent to a zero
5342 Solvers
-
Which values occur exactly three times?
5088 Solvers
-
Given a matrix, return the last eigen value
221 Solvers
-
328 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!