HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Search > problem:


50552 - Casual shoes

Guest
• Review clarifications (1)

Section problems

• 50470 - Close Pairs - Revised
• 50784 - Top Growing Company
• 50458 - Weekly Report
• 50478 - Letter Grades
• 50791 - Mine field
• 50867 - Average of the Best Grades
• 50782 - Max of N integers
• 50460 - Median of 3 Numbers
• 50552 - Casual shoes
• 50558 - Biggest Barn
• 50562 - List of students
• 50566 - Grade Point Average (GPA)
• 50570 - Prime numbers in the seg...
• 50573 - Count and Sum
• 50575 - Number of Prime numbers
• 50576 - Number of Perfect numbers
• 50586 - Prime Palindromes

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.
Prepared by Ibrahim Mesecan.

How many casual shoes are there?

Shqip

Ms. Jona has a shoe store. She wants to store all his shoe stock information in a computerized system. Whenever a customer comes the salesclerk will ask for the prefrences of the customer, and then the computer will list the positions of the shoes with the customer's prefrences.

Question:
Write a program that is going to get the preferences of the customer and then the program is going to list the locations of all shoes that fit the customer preferences.

Input specification
In the first line, you will be given the preferences of the customer:

  1. The shoe type: one word which is at most 16 chars
  2. The start size: an integer (where 10 ≤ size < 60)
  3. The end size: an integer (where 10 ≤ size < 60)
where start size ≤ end size. Then, you will be given a number n (where 1 ≤ n < 1000), and the following n lines contain n-shoes information.
  1. The shoe type: one word which is at most 16 chars
  2. The color: one word which is at most 12 chars
  3. The size: an integer (where 10 ≤ size < 60)
  4. The price: an integer (where 1 ≤ size < 30000)
  5. The location: Two chars one letter followed by a digit
Note: The shoe type and color informations contain only uppercase or lowercase English letters and no other special chars.

Output specification
Show the locations of the shoes which fit the customer preferences. Show the items in order of appareances. (First is shown first).

Sample Input I
  Casual 33 35
  7
  Dance Pink 41 1900 A4
  Casual Grey 33 1800 G2
  Mountaineering Red 22 2400 B9
  Sandals Red 44 1300 C6
  Casual Grey 28 1700 B2
  Casual Brown 35 2200 A4
  Derby Black 42 1600 F1

Sample Output I
  G2
  A4


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

www.contester.ru