Здравейте, колеги :)
Или нещо не виждам, или нещо не разбирам.
В Задачата Maximum element, как при Input: 1024, output-a става 10000000000?
You have an empty sequence, and you will be given N commands. Each command is one of the following types:
- "1 X" - Push the element X into the stack.
- "2" - Delete the element present at the top of the stack.
- "3" - Print the maximum element in the stack.
- The first line of input contains an integer N, where 1 ≤ N ≤ 105
- The next N lines contain commands. All commands will be valid and in the format described
- The element X will be in range 1 ≤ X ≤ 109
- The type of the command will be in range 1 ≤ Type ≤ 3
- For each command of type "3", print the maximum element in the stack on a new line.
- Input: 1024 Output: 100000000