#include <iostream>
int *test()
{
return new int[10] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
}
int main() {
int *a = test();
for (int i = 0; i < 10; ++i)
std::cout << a[i];
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50ICp0ZXN0KCkKewoJcmV0dXJuIG5ldyBpbnRbMTBdIHswLCAxLCAyLCAzLCA0LCA1LCA2LCA3LCA4LCA5fTsKfQoKaW50IG1haW4oKSB7CglpbnQgKmEgPSB0ZXN0KCk7Cglmb3IgKGludCBpID0gMDsgaSA8IDEwOyArK2kpCgkJc3RkOjpjb3V0IDw8IGFbaV07CglyZXR1cm4gMDsKfQ==