All submissions for this problem are available.
You are provided with a keyword, and place them in a 5x5 matrix.
The Matrix is constructed by filling the letters of keyword from left to right and from top to bottom, by eliminating the repeating letters. The letter I/J should be considered as same element.
The remaining matrix blocks are filled with the remaining letters in alphabetical order.
First line is the keyword, second line is the input.
1.Repeating letters of input that are in same pair are separated with a filler letter ‘x’.
Eg. In “Commit” MM should be replaced with MX and MI
2.Two letters of input that fall in same row of matrix are replaced by the letter to the right, with the first element of the row circularly following the last.
Eg.PA should be replaced with AV.
3.Two letters of input that fall in same column of matrix are replaced by the letter beneath, with the top element of the column circularly following the last.
Eg.PB should be replaced with BG.
4.Each letter of the input in the pair is replaced by the letter that lies in it’s own row and the
column occupied by the other keyword letter(intersection point).
Eg. AR should be replaced with VQ.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.