Mission 1 - V : Back to Home
P1022 Mission 1 - V : Back to Home
Difficulty:
Problem Background
Radar solves the problem Cui2010 gave him, and wins. So he went back to the RAO (The Republic of AOCode). Seeing him okay is so awesome, so we decided to give Radar a surprise. But Radar don’t want the surprise and wants to give it to you, but you have to solve his problem first.
So, can you solve Radar’s problem?
Problem Statement
There’s a sequence with numbers in it. Radar will give you queries, and there are kinds:
This means you have to push the number to the back of .
This lets you sort the sequence.
This makes you erase all elements of value in .
Note that if there’s no ’s, do nothing.
This makes you print the smallest element in , then pop it.
Note that if there’s no element in right then, print .
Could you make it and get the gift?
Input
is one of below:
Output
Output lines ( is the number of the kind of queries), each line contains the answer of one of the queries. (One by One)
Samples
Input 1
Output 1
Input 2
Output 2
Input 3
Output 3
Constraints
- For all available 's, .
- For all available 's, .
信息
- ID
- 1022
- 难度
- 650
- 分类
- (无)
- 标签
- 递交数
- 4
- 已通过
- 1
- 通过率
- 25%
- 上传者