题解
2025-08-27 10:35:05
发布于:江苏
1阅读
0回复
0点赞
#include<iostream>
#include<stack>
using namespace std;
int main(){
int n;
stack<int>stk;
cin>>n;
for(int i=0;i<n;i++){
int x;
cin>>x;
stk.push(x);
}
while(stk.size()){
cout<<"=====stk.size["<<stk.size()<<"]======\n";
cout<<" stk.pop["<<stk.top()<<"]\n";
stk.pop();
}
return 0;
}
这里空空如也
有帮助,赞一个