fork(59) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main(void)
  5. {
  6. std::vector<int> v = { 1, 4, 9, 16, 25, 36, 49 };
  7.  
  8. std::cout << v.rbegin()[1] << std::endl
  9. << v.end()[-2] << std::endl;
  10.  
  11. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
36
36