题解
2024-12-29 20:00:27
发布于:广东
1阅读
0回复
0点赞
#include <iostream>
#include <stack>
using namespace std;
stack<int> st;
int n,x;
int main(){
cin>>n;
while(n--){
cin>>x;
st.push(x);
}
while(!st.empty()){
cout<<st.top()<<" ";
st.pop();
}
return 0;
}
这里空空如也
有帮助,赞一个