All submissions for this problem are available.
Orders have been sent from the head quarters to submarine to “MOVE SOUTH WEST
TO 30 KM”, but the message is in encoded (Encrypted) form. As M has ASCII code of
77, but they added 1(i.e. key) in it, then M became 77+1 i.e. N. So the entire
message is in encrypted form i.e. our hackers has stolen the following line
The key can be from -30 to 115. The value of key is not known and we got another
message from our hackers. The problem is to find the key, and only thing that you
know the word “CRAZY BLACK CAT” which is the part of the string some where in it.
1) Encrypted message received:
2) Known sub string
CRAZY BLACK CAT
2) Message= LISTEN, THE CRAZY BLACK CAT STOP WHERE YOU ARE
Note: There will be multiple test cases and the input will end on the line containing a
Input: NPWF!TPVUI!XFTU!UP!41LN WEST TO SPZ[LU3’[OL’JYHa`’ISHJR’JH['Z[VW’^OLYL’`V\’HYL CRAZY BLACK CAT 0 Output: MOVE SOUTH WEST TO 30 KM LISTEN, THE CRAZY BLACK CAT STOP WHERE YOU ARE
|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, rust, SCALA, swift, 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, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.