#include <iostream>
#include <memory>
#include <vector>
int main() {
std::vector<std::unique_ptr<int>> vec;
for (int i = 0; i < 10; ++i)
vec.emplace_back(new int(i));
for (auto& i : vec)
std::cout << *i << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5PgojaW5jbHVkZSA8dmVjdG9yPgoKaW50IG1haW4oKSB7CglzdGQ6OnZlY3RvcjxzdGQ6OnVuaXF1ZV9wdHI8aW50Pj4gdmVjOwoJZm9yIChpbnQgaSA9IDA7IGkgPCAxMDsgKytpKQoJCXZlYy5lbXBsYWNlX2JhY2sobmV3IGludChpKSk7CgoJZm9yIChhdXRvJiBpIDogdmVjKQoJc3RkOjpjb3V0IDw8ICppIDw8IHN0ZDo6ZW5kbDsKCXJldHVybiAwOwp9