HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


Ind_04-30. 50658 - The Message

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• Ind_02-20. 50745 - Bitonic Sequence
• Ind_02-30. 50657 - Permutations an...
• Ind_03-10. 50743 - Total Scholarshi...
• Ind_03-20. 50515 - Lines - Revisited
• Ind_03-40. 50777 - Dwarfs Maze
• Ind_03-50. 50679 - Jetpack Hurdle J...
• Ind_04-10. 50787 - Expected Value
• Ind_04-20. 50520 - Filling a Matrix ...
• Ind_04-30. 50658 - The Message

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 2500/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

The Message

You work in the national examination agency and the people there are preparing the state matura exams. The people working in the project are gathered in two buildings and they are not allowed to communicate with any body else until the exam is over. If they need to communicate for some reasons, they communicate over internet using encrypted pictures. The messages are hidden in pictures.

The last three bits of every two numbers are taken and merged. The new number formed is added to 65. Because the new number is 6 bits long, normally, it can have the values between 0 and 63. The new number formed is added to 65 to form the letters of the message. For example: when you have the following number sequence: 152 149 130 56... The last three bits of 152 and 149 are '000' and '101'. Then the new number '000101' (5) is added to 64 to form the new letter (E). Similarly, The last three bits of 130 and 56 are '010' and '000'. Then the new number '010000' (16) is added to 64 to form the new letter (P). By this way the message is formed and hidden in the picture.

Question: Write a program that reads a picture with m rows and n cols. Then the program shows the hidden message.

Input specification
You will be given two numbers (m and n) in the beginning which are between 1 and 1500 and whose product is an even number. Then in the following m lines you will be given n numbers where the given numbers are integers between 0 and 255. And, there are no more than 2500 chars in the message.

Output specification
Show the secret message.

Sample Input I
2 5
152 149 130 56 73
111 137 187 24 97
Sample Input II
3 6
226 1 30 101 116 237
62 123 118 172 53 177
125 151 21 158 118 139
Sample Output I
EPOKA
Sample Output II
Questions


Для отправки решений необходимо выполнить вход.

www.contester.ru