To solve this problem you have to complete the code that you will find at the end of the statement. You have to replace each ??? with one or more lines of code. Do not change anything else. Download from the website of the problem the file code.cc with the code to be completed (click on the corresponding button “.CPP”), edit it and submit it to the judge.
A travel agency maintains a cruise ship catalog for its customers. For each cruise, we only store one code to indicate where the ship is going, the length of the trip and what is its price. Because the agency is very modest, it does not keep information on more than one cruise ship of each length. Codes and prices can be repeated.
The agency program allows us to do five different operations:
Input
Input consists of several operations as indicated above. Codes are lowercase words. Lengths and prices are integer numbers between 1 and 109.
Output
For each operation (except update operations), print the requested information.
Input
n u greece 20 2500 p s u majorca 14 3000 p n s q 10 q 14 u minorca 14 4000 q 14 u valencia 10 2500 s
Output
num: 0 ---------- greece 20 2500 ********** no ---------- majorca 14 3000 greece 20 2500 ********** num: 2 greece 20 2500 -1 3000 4000 minorca 14 4000