#include <iostream>
#include <vector>
int main() {
std::vector<float> v{1,2,3,4,5};
// Output: 3
std::cout << v.at(v.size()/2) << std::endl;
// Now a user provides another value, maybe
v.push_back(6);
// Output: 4
std::cout << v.at(v.size()/2) << std::endl;
}
ICAgICNpbmNsdWRlIDxpb3N0cmVhbT4KICAgICNpbmNsdWRlIDx2ZWN0b3I+CiAgICAgCiAgICBpbnQgbWFpbigpIHsKICAgIAlzdGQ6OnZlY3RvcjxmbG9hdD4gdnsxLDIsMyw0LDV9OwogICAgICAgIAogICAgICAgIC8vIE91dHB1dDogMwogICAgCXN0ZDo6Y291dCA8PCB2LmF0KHYuc2l6ZSgpLzIpIDw8IHN0ZDo6ZW5kbDsKICAgICAgICAKICAgICAgICAvLyBOb3cgYSB1c2VyIHByb3ZpZGVzIGFub3RoZXIgdmFsdWUsIG1heWJlCiAgICAgICAgdi5wdXNoX2JhY2soNik7CgogICAgICAgIC8vIE91dHB1dDogNAogICAgCXN0ZDo6Y291dCA8PCB2LmF0KHYuc2l6ZSgpLzIpIDw8IHN0ZDo6ZW5kbDsKICAgIH0=