#include <iostream>
#include <vector>
#include <array>
int main()
{
// vector
std::vector<int> a1(5);
std::vector<int>::iterator i1 = a1.begin();
std::vector<int>::iterator i2 = std::begin(a1);
*(i1+4) = 10;
i1[4] = 10;
// C++ array
std::array<int, 5> a2;
int* i3 = a2.begin();
int* i4 = std::begin(a2);
*(i4+4) = 10;
i3[4] = 10;
// C-style array
int a3[5];
int* i5 = a3;
int* i6 = &a3[0];
int* i7 = std::begin(a3);
*(i5+4) = 10;
i6[4] = 10;
i7[4] = 10;
std::cout << a1[4] << a2[4] << a3[4] << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YXJyYXk+CmludCBtYWluKCkKewogICAgLy8gdmVjdG9yCiAgICBzdGQ6OnZlY3RvcjxpbnQ+IGExKDUpOwogICAgc3RkOjp2ZWN0b3I8aW50Pjo6aXRlcmF0b3IgaTEgPSBhMS5iZWdpbigpOwogICAgc3RkOjp2ZWN0b3I8aW50Pjo6aXRlcmF0b3IgaTIgPSBzdGQ6OmJlZ2luKGExKTsKICAgICooaTErNCkgPSAxMDsKICAgIGkxWzRdID0gMTA7CgogICAgLy8gQysrIGFycmF5CiAgICBzdGQ6OmFycmF5PGludCwgNT4gYTI7CiAgICBpbnQqIGkzID0gYTIuYmVnaW4oKTsKICAgIGludCogaTQgPSBzdGQ6OmJlZ2luKGEyKTsKICAgICooaTQrNCkgPSAxMDsKICAgIGkzWzRdID0gMTA7CgogICAgLy8gQy1zdHlsZSBhcnJheQogICAgaW50IGEzWzVdOwogICAgaW50KiBpNSA9IGEzOwogICAgaW50KiBpNiA9ICZhM1swXTsKICAgIGludCogaTcgPSBzdGQ6OmJlZ2luKGEzKTsKICAgICooaTUrNCkgPSAxMDsKICAgIGk2WzRdID0gMTA7CiAgICBpN1s0XSA9IDEwOwoKICAgIHN0ZDo6Y291dCA8PCBhMVs0XSA8PCBhMls0XSA8PCBhM1s0XSA8PCAnXG4nOwp9Cg==