#include <iostream>
#include <cassert>
class CLASS_hoge
{
private:
int i_;
public:
CLASS_hoge() : i_(-1) { }
void input(int i) { i_ = i; }
void output()
{
assert(0 <= i_);
std::cout << i_ << std::endl;
}
};
int main()
{
CLASS_hoge *cl[5];
int j = 0;
for(int i = 0; i < 5; i++)
{
cl[i] = new CLASS_hoge();
cl[i]->input(j);
j += 100;
}
for(int i = 0; i < 5; i++) { cl[i]->output(); }
for(int i = 0; i < 5; i++) { delete cl[i]; }
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y2Fzc2VydD4KCmNsYXNzIENMQVNTX2hvZ2UKewpwcml2YXRlOgoJaW50IGlfOwoJCnB1YmxpYzoKCUNMQVNTX2hvZ2UoKSA6IGlfKC0xKSB7IH0KCXZvaWQgaW5wdXQoaW50IGkpIHsgaV8gPSBpOyB9Cgl2b2lkIG91dHB1dCgpCgl7CgkJYXNzZXJ0KDAgPD0gaV8pOwoJCXN0ZDo6Y291dCA8PCBpXyA8PCBzdGQ6OmVuZGw7Cgl9Cn07CgppbnQgbWFpbigpCnsKCUNMQVNTX2hvZ2UgKmNsWzVdOwoJaW50IGogPSAwOwoJCglmb3IoaW50IGkgPSAwOyBpIDwgNTsgaSsrKQoJewoJCWNsW2ldID0gbmV3IENMQVNTX2hvZ2UoKTsKCQljbFtpXS0+aW5wdXQoaik7CgkJaiArPSAxMDA7Cgl9CgkKCWZvcihpbnQgaSA9IDA7IGkgPCA1OyBpKyspIHsgY2xbaV0tPm91dHB1dCgpOyB9CgkKCWZvcihpbnQgaSA9IDA7IGkgPCA1OyBpKyspIHsgZGVsZXRlIGNsW2ldOyB9CgkKCXJldHVybiAwOwp9