|
|
вернуться в форумPlease help.MLE#10.Thank! #include<iostream> using namespace std; #include<stack> #include<vector> int main() { std::stack<int,std::vector<int> >val[1001]; int k,i=0,n,m; cin>>k; char a[4]; while(i<k) { cin>>a; if(a[1]=='U') { cin>>n>>m; val[n].push(m); } else if(a[1]=='O') { cin>>n; cout<<val[n].top()<<endl; val[n].pop(); } i++; }
return 0; } Any idea how to optimize?Please help! Thank! Edited by author 10.11.2007 23:02 |
|
|