Ê. 栈的实现

    Type: Default 1000ms 256MiB

栈的实现

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.

Description

实现栈的基本功能

Format

Input

T组测数据(30组左右)

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

接下来n行

共有2种操作

push x 表示将x压入栈(x在int范围内)

pop 表示出栈,并输出

Output

每个pop输出对应结果

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

Samples

1
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