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

Сборники > Kovrov IT > задача:


230. 50286 - Remove Duplicates

Гость
• Обсуждение задачи (3)

Задачи сборника

• 165. 50360 - National Elections
• 170. 50319 - Toll Plazas
• 180. 50755- Top N Donors - 1
• 185. 50784 - Top Growing Company
• 190. 50734 - Product Info (In Srt)
• 200. 50290 - Minimax Sum
• 210. 50361 - Align Two Lists
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids

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

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

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

The company you are working stores some product info in a file. But, the file contains several data the same. You are asked to remove the duplicates. The two items are assumed to be the same if they have the same productNames and productIDs.

Input specification
You are first given a number (n) that shows the number of products in the following lines where 1 ≤ n ≤ 100. The following n lines contain productID, productName, amount and unitPrice, where productID amount and unitPrice are float numbers and productName is a text which can contain at most 24 chars (English letters or space). The information given is separated by semicolons. And the length of one line doesn't exceed 100 chars.

Output specification
Show the new list duplicates removed. The duplicate items might have different values on their fields, you can remove any of the duplicated items. The program will control only the productID and productName fields. Show the items in ascending order according to their productIDs.

      

  Sample Input:
  4
  100; Soap; 12; 65.5;
  105; Spaghetti Sauce; 17; 78.3; 
  100; Soap; 32; 15;
  101; Candy; 25.5; 55;

  Sample Output:
  100 Soap 12 65.5
  101 Candy 25.5 55
  105 Spaghetti Sauce 17 78.3  


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

www.contester.ru