HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


2nd-3. 50533 - Contacts List

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

• 0th-4. 50404 - Sum of Self Powers
• 0th-5. 50692 - How much money?
• 1st-2. 50483 - Group Total
• 1st-3. 50484 - Number Of Letters
• 1st-4. 50473 - Counting Circles Posit...
• 1st-6. 50485 - Center of gravity of ...
• 2nd-1. 50522 - Multiplication Table - 2
• 2nd-2. 50512 - Coding redundancy
• 2nd-3. 50533 - Contacts List
• 2nd-5. 50793 - Top M Customers
• 2nd-6. 50486 - Problems and Progr...
• 3rd-2. 50405 - Accounts Receivable
• 3rd-3. 50474 - Sum of Two Primes
• 3rd-4. 50406 - Draw Pattern 178
• 3rd-5. 50415 - The Scientist
• 3rd-6. 50695 - Longest link between...
• 4th-1. 50491 - Brokers

Feedback

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

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

Contacts List

You are required to build a very simple application that can search for the contacts stored in the phone by taking a query from the user.

Question: Take the list of the contacts and a query string and decide if each of the contacts contains in it or not.

Input specification
You will be given an integer (1 <= n <= 50000) which represents the number of the contacts. In another line, you will get a short query (a String composed only of 2 characters). In the following n lines, you will get the name of each contact (a String of length at most 10 characters).

Output specification
Show each of the names that contains the query in the same order as in the input. If there is no match, show the message "No matching." without the quotes.

Sample Input I
5
an
Agim
Dorian
Ardit
Arjan
Agon
Sample Output I
Dorian
Arjan



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

www.contester.ru