fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. stack <int> st;
  6. string s;
  7. int x;
  8. while(cin >> s)
  9. {
  10. if(s=="push")
  11. {
  12. cin >> x;
  13. st.push(x);
  14. cout << "ok";
  15. }
  16. if(s=="push")
  17. {
  18.  
  19. }
  20. if(s=="push")
  21. {
  22.  
  23. }
  24. if(s=="push")
  25. {
  26.  
  27. }
  28. }
  29.  
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
Standard output is empty