#include <iostream>
#include <vector>
using namespace std;
int main () {
vector<int> a(5);
auto x = a[1]; // x : int
decltype(a[1]) y = a[1]; // y : int&
cout << a[1] << endl;
x = 123;
cout << a[1] << endl;
y = 456;
cout << a[1] << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluICgpIHsKIAogICAgICAgIHZlY3RvcjxpbnQ+IGEoNSk7CiAKICAgICAgICBhdXRvICAgICAgICAgICB4ID0gYVsxXTsgICAvLyB4IDogaW50CiAgICAgICAgZGVjbHR5cGUoYVsxXSkgeSA9IGFbMV07ICAgLy8geSA6IGludCYKIAogICAgICAgIGNvdXQgPDwgYVsxXSA8PCBlbmRsOwogICAgICAgIHggPSAxMjM7CiAgICAgICAgY291dCA8PCBhWzFdIDw8IGVuZGw7CiAgICAgICAgeSA9IDQ1NjsKICAgICAgICBjb3V0IDw8IGFbMV0gPDwgZW5kbDsKICAgICAgICByZXR1cm4gMDsKfQ==