Your task is to write a program that mantains a collection of integer numbers, possibly repeated, and that does the operation according to the indications of the user:
Input
The input consists of a sequence of orders as the described ones, each one in a line.
Output
For each done query, your program must print in a line the greatest number in that moment. Also, it must print an error line for each operation (except the store operation) when the collection does not have any number, following the format of the instance.
Hint: Notice that the collection can have repeated elements. Moreover, is necessary that your solution is very fast: if you have never used heaps (priority_queue) or (map), you should take advantage to learn. Perhaps asking in the forum... (when the contest ends, of course).
Author: Salvador Roura
Input
C G 10 C G -7 C G 20 C I 3 C D 15 C E C G 30 C D 37 E C E C E I 1 C E D 3 G 4 C
Output
error: no elements 10 10 20 23 10 8 30 -7 -7 error: no elements error: no elements error: no elements error: no elements 4