vector
2025-11-21 17:49:12
发布于:浙江
3阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int n,x;char c;vector<int>a;
int main(){
cin>>n;
while(n--){
cin>>c;
if(c=='I')cin>>x,a.push_back(x);
else a.pop_back();
}
for(auto v:a){
cout<<v<<" ";
}
return 0;
}
这里空空如也






有帮助,赞一个