Josif_tepe

Untitled

Oct 15th, 2025
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. #include <queue>
  4. #include <vector>
  5. #include <queue>
  6. #include <stack>
  7. using namespace std;
  8.  
  9. int main() {
  10.     stack<int> st;
  11.    
  12.     st.push(1);
  13.     st.push(2);
  14.     st.push(3);
  15.    
  16.     cout << st.top() << endl;
  17.    
  18.     cout << "Sz: " << st.size() << endl;
  19.     st.pop();
  20.     cout << st.top() << endl;
  21.    
  22.     cout << "Sz: " << st.size() << endl;
  23.    
  24.    
  25.     return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment