HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


230. 50286 - Remove Duplicates

Guest
• Discussion of problem (3)

Volume problems

• 50468 - Draw Matrix - 2
• 010. 50381 - Sum of the numbers
• 125. 50538 - Sum of kth Diagonal
• 140. 50599 - Sum of Squared Error ...
• 15-SprPrE1-80. 50741 - DNA Distance
• 155. 50334 - What is the class aver...
• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding

Feedback

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

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
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