#include <iostream>
#include <vector>
#include <string>
int main()
{
std::vector<std::string> vec_str;
vec_str.reserve(4);
vec_str.push_back("c++");
vec_str.push_back("c");
vec_str.push_back("java");
vec_str.push_back("python");
for (auto elem : vec_str) {
std::cout << elem << ' ';
}
std::cout << std::endl;
swap(vec_str[1], vec_str[3]);
for (auto elem : vec_str) {
std::cout << elem << ' ';
}
std::cout << std::endl;
return 0;
}
/*
run:
c++ c java python
c++ python java c
*/