优先队列的实现

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

实现基本的优先队列

输入格式

每组第一行是n表示有n个操作(n<=100000)

接下来n行

共有2种操作

push x 表示将x加入队列(x在int范围内)

pop 表示将队列中最大的数出队,并输出

输出格式

每个pop输出对应结果

如果此时队列为空,则输出“Empty”

样例

7
pop
push 1
push 2
pop
push 3
pop
pop
Empty
2
3
1

Limitation

1s, 1024KiB for each test case.

第七届SWPU-ACM老生预选赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
187
Start at
2022-9-19 14:00
End at
2022-10-28 14:00
Duration
936 hour(s)
Host
Partic.
45