关于stack
  • 板块学术版
  • 楼主MC_dream_tsr
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/9/8 13:44
  • 上次更新2024/9/8 16:53:42
查看原帖
关于stack
1138325
MC_dream_tsr楼主2024/9/8 13:44

编译失败,求原因,勿喷,初学

# include<bits/stdc++.h>
using namespace std;
stack<int> sta;
int main(){
	int n, t;
	cin >> n;
	for(int i = 0; i < n; i++) {
		cin >> t;
		sta.push(t);
	}
    cout << sta.pop();
	return 0;
}
2024/9/8 13:44
加载中...