RZSCSRVC - Secret Service Agent
You all know about famous secret service agent Masud Rana. Masud Rana is a fictional character created in 1966 by writer Qazi Anwar Hussain. Today he is going to send a message to his colleague Shohana Chowdhury in encrypted format.
He likes letter R very much, so he encrypt a massage s in following pattern with height h(always odd).
If his massage is s = “ABCDEFGHIJKLMNOPQRSTUVWXYZ” & h = 5
Then his message will be like this:
That’s mean result format have height h=5, and all letter will be in sequentially make big R. All other space will be fill up with #. Please see the following figure for better understanding.
(Line has drawn for explanatatory purpose )
In first there is two integer n (1 <= n <= 1000) and h(1 <= h <=n, h is odd), length of the message and height of output. In next line there is a message s, message is a non-empty string consist with only capital letter.
Print h line with corresponding answer with describe format.
Note that, there should not have any extra # after last letter of each line.
Input: 13 3 PHQGHUMEAYLNA Output: QG#YL HH#AN PUMEA
Input: 22 5 MXWTPTTTYKDUYVXJBZHQUP Output: PTT#ZHQ T#T#B#U WKY#J#P XD##X M#UYV
Input: 22 7 MXWTPTTTYKDUYVXJBZHQUP Output: TTYK T##D P##U TXVY WJ###P X#B##U M##ZHQ
[ This problem originally contributed by Reajul Haque Reayz, CSE, CoU ]
According to my submission, H is always odd.
Re: Blue Mary
@psetter can you check my submission id 22085644. I dont know again why always WA. Thanks beforeLast edit: 2018-08-02 17:51:20
For at least one test data, h is not odd.
please give the details specification of exact path of the big R characterLast edit: 2018-07-27 14:20:17
It's been long since I've written something this ugly, elated to get AC without needing to debug my hideous code. My kind of problem nevertheless, thanks.