wuhongzhen 2020-11-21 8:36:04 14 返回题目
本人测试点2过不去 help help help!!!
其实直接发代码也是行的
蟹蟹(好家伙迟到2年
#include <bits/stdc++.h> using namespace std; stack<int> s; int main() { int n; cin>>n; int x,p; for(int i=1;i<=n;i++) { cin>>p; if(p==1) { cin>>x; s.push(x); } else s.pop(); } if(s.empty()) cout<<"impossible!"; else cout<<s.top(); }
救命啊~~~~~
共 3 条回复
蟹蟹(好家伙迟到2年
救命啊~~~~~