Page 1 of 1

1339 - Ancient Cipher

Posted: Sun Dec 29, 2013 5:41 pm
by sakthiiv
In this problem, substitution cipher is provided first followed by permutation cipher
For the word VICTORIOUS, applying substitution we get WJDUPSJPVT, applying permutation we get JWPUDJSTVP, this is easily understandable,
But for HEHE, applying substitution we get IFIF, applying permutation we get FIFI, am i wrong or is that something i am missing.
Scratching my head for almost 3 hours.

Re: 1339 Ancient Cipher

Posted: Wed Jan 01, 2014 2:54 pm
by PromeNabid
"Substitutes for all letters must be different. For some letters substitute letter may coincide with the original letter."
It is never said that substituetes letters will be always next ones.
Hope this input will help.
Input:

Code: Select all

HEHE
HAHA
HEHE
HIHI
HEHE
EHEH
HEHE
ABAB
HEHE
MMAA
Output:

Code: Select all

YES
YES
YES
YES
YES