Problem 42782. GJam March 2016 IOW: Passwords and the Block Set
This Challenge is derived from GJam March 2016 Annual I/O for Password Security. This is the small-2 case of up to 50 passwords of length 1 to 26
The GJam story goes that a random block set A:Z exists to the child of a paranoid corporate president. He is worried that his password(s) may exist in the block pattern. Produce a 26 character block sequence that does not contain his password. If no sequence can be made that does not contain his strong password output 'IMPOSSIBLE'.
Input: [PW], string up to 50 space separated passwords of 1 to 26 characters
Output: [Pstr], string containing A:Z with no instance of PW or 'IMPOSSIBLE'
Examples: [PW] [Pstr]
[X] [IMPOSSIBLE] [QQ][ABCDEFGHIJKLMNOPQRSTUVWXYZ] ['XYZ GCJ OMG LMAO JK'][ABCDEFGHIKLMNOPQRSTUVWXYJZ]
Google Code Jam 2016 Open Qualifier: April 8, 2016
Theory: Remove Impossible cases first. Produce a PW string with a robust start/end pairs and a random middle. Try multiple formats with a timer. The most common letter can be placed at both the start and end with random internal letters. OR you can just guess for awhile and then give up. The key here is an efficient invalid string check. The IOW Champion Stacy992's java solution is in the test suite for misguidance versus the Matlab 5 line solution.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15530 Solvers
-
1596 Solvers
-
1714 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1100 Solvers
-
282 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!