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

Разделы > Linear Data structures: Stacks, Queues, Linked Lists, etc > задача:


50286 - Remove Duplicates

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

Задачи раздела

• 50262 - Brackets
• 50291 - Postfix Arithmetic Expressions
• 50286 - Remove Duplicates
• 50775 - Balanced Parenthesis
• 50340 - Game 19
• 50877 - Friendly Queue
• 51086 - Top popular student
• 50774 - Hot Potato
• 50777 - Dwarfs Maze
• 50781 - ReversesreveR
• 50780 - Hot Potato - Revisited

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

Если у вас есть предложения или пожелания по работе 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