fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7.  
  8. vector<int> vec;
  9. vec.push_back(10);
  10.  
  11. for(int i = 0; i < vec.size(); i++){
  12. cout << vec.back() << endl;
  13. }
  14. cout << vec.size() << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 4360KB
stdin
Standard input is empty
stdout
10
1