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
-
Least common multiple of many numbers
235 Solvers
-
516 Solvers
-
Create One Large Eye of size N x N Quickly?
93 Solvers
-
Who is the smartest MATLAB programmer?
753 Solvers
-
843 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!