ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > CEN303 2013-15 Questions > задача:


50531 - File Decryption

CEN303 2013-15 Questions

Старт: 15.дек.2013 в 14:00:00
Финиш: 15.дек.2013 в 19:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 50472 - Minimum Sum Triangle
• 50842 - Minimum Sum Triangle - DP
• 50319 - Toll Plazas
• 51000 - Book Index
• 50531 - File Decryption
• 50464 - From Tirana to Durres
• 13-Fall2-10. 50411 - Sum of the Lea...
• 13-Fall2-20. 50687 - Pascal Triangle - 2
• 13-Fall2-40. 50753 - Average of the...
• 13-Fall2-50. 50686 - The Container
• 14-Fall1-10. 50740 - Service Time - 1
• 14-Fall1-20. 50750 - Service Time - 2
• 14-Fall1-30. 50771 - BST Level Sum

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

File Decryption

Your National Secret Agency, wants to transmit some encrypted files. You will be given the character correspondence. And you are required to decrypte the files.

Question:
Write a program that is going to read character correspondence and then n lines of encrypted text. Your program will show n lines of decrypted text.

Input specification
You will be first given two integer numbers:

  • number of text lines (n) where 1 ≤ n ≤ 2000 and
  • number of chars used in character correspondence list (m) where 1 ≤ m ≤ 26
Then the following m lines will list m character pairs (actual character and corresponding char in encrypted text), You will be given n lines encrypted text in the end. Every line may contain a text up to 255 chars. The text will contain only 26 English lowercase letters.

Output specification
Show n lines of decrypted text.

Sample Input I
  3 17
  a k
  c x
  d b
  e d
  g u
  i l
  l v
  m h
  n s
  o g
  p z
  r o
  s w
  t q
  u t
  w f
  y n
  ngto skqlgskv wdxodq kudsxn  
  fksqw qg qokswhlq
  wghd dsxonzqdb bkqk
Sample Input II
  2 14
  a f
  c r
  d l
  e w
  f e
  i y
  m i
  n d
  o m
  p k
  r a
  s z
  t c
  u n
  yd f rmikwcycymd  
  ema zcnlwdcz
Sample Output I
  your national secret agency  
  wants to transmit
  some encrypted data
Sample Output II
  in a competition
  for students


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

www.contester.ru