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
|
Для отправки решений необходимо выполнить вход.
|