给定 n 次操作,每次操作会先输入一个 opt 表示操作类型。
若 opt=1 ,则为插入一个元素 x 在末端, x 在 opt 后面输入。
若 opt=2 ,则为删除最后一个元素。
n 次操作后输出目前序列中所有的元素。
5
1 2
1 3
1 5
2
1 3
2 3 3
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.