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:
- The shoe type: one word which is at most 16 chars
- The start size: an integer (where 10 ≤ size < 60)
- 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.
- The shoe type: one word which is at most 16 chars
- The color: one word which is at most 12 chars
- The size: an integer (where 10 ≤ size < 60)
- The price: an integer (where 1 ≤ size < 30000)
- 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
|
Для отправки решений необходимо выполнить вход.
|