序列修改
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.
题目描述
给定 次操作,每次操作会先输入一个 表示操作类型。
若 opt=1
,则为插入一个元素 在末端, 在 opt
后面输入。
若 opt=2
,则为删除最后一个元素。
次操作后输出目前序列中所有的元素。
样例 1 输入
5
1 2
1 3
1 5
2
1 3
样例 2 输出
2 3 3
1.17竞赛B班
- Status
- Done
- Rule
- IOI
- Problem
- 5
- Start at
- 2025-1-17 13:45
- End at
- 2025-1-17 15:45
- Duration
- 2 hour(s)
- Host
- Partic.
- 11