#include <iostream>
using namespace std;
auto foo(auto c, auto i) -> auto&
{
return c[i];
}
int main()
{
int arr[10] = {0};
std::cout << foo(arr, 1) << std::endl;
foo(arr, 1) = 2;
std::cout << foo(arr, 1) << std::endl;
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCmF1dG8gZm9vKGF1dG8gYywgYXV0byBpKSAtPiBhdXRvJgp7CglyZXR1cm4gY1tpXTsKfQoKCmludCBtYWluKCkKewogICAgaW50IGFyclsxMF0gPSB7MH07CiAgICAKICAgIHN0ZDo6Y291dCA8PCBmb28oYXJyLCAxKSA8PCBzdGQ6OmVuZGw7CiAgICAKICAgIGZvbyhhcnIsIDEpID0gMjsKCQogICAgc3RkOjpjb3V0IDw8IGZvbyhhcnIsIDEpIDw8IHN0ZDo6ZW5kbDsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCXJldHVybiAwOwp9