#include <iostream>
int& foo()
{
int a = 0;
return a;
}
int& bar()
{
int a = 10;
return a;
}
int main()
{
int& k = foo();
std::cout << k << std::endl;
bar();
std::cout << k << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50JiBmb28oKQp7CglpbnQgYSA9IDA7CglyZXR1cm4gYTsKfQoKaW50JiBiYXIoKQp7CglpbnQgYSA9IDEwOwoJcmV0dXJuIGE7Cn0KCmludCBtYWluKCkKewoJaW50JiBrID0gZm9vKCk7CglzdGQ6OmNvdXQgPDwgayA8PCBzdGQ6OmVuZGw7CgliYXIoKTsKCXN0ZDo6Y291dCA8PCBrIDw8IHN0ZDo6ZW5kbDsKCXJldHVybiAwOwp9