5 条题解
-
-2
#include<bits/stdc++.h> using namespace std; int stk[105],top; int main(){ int n,op; cin>>n; while(n--){ cin>>op; if(op1){ int x; cin>>x; stk[++top]=x; } else top--; } if(op2&&top0){ cout<<"impossible!"; } else if(top0){ cout<<"impossible!"; }else{ cout<<stk[top]; } return 0; }
- 1
信息
- ID
- 387
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 117
- 已通过
- 62
- 上传者