#include <iostream>
typedef void (*myfunc)();
const int FUNCS_COUNT = 368;
template<unsigned i>
void print_func() {
std::cout << i << std::endl;
}
template<unsigned i>
void push_func(myfunc *funcs) {
funcs[i] = &(print_func<i>);
push_func<i-1>(funcs);
}
template<>
void push_func<0>(myfunc *funcs) {
funcs[0] = &(print_func<0>);
}
int main() {
myfunc funcs[FUNCS_COUNT];
push_func<FUNCS_COUNT>(funcs);
for (int i=0; i<FUNCS_COUNT; ++i)
funcs[i]();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdHlwZWRlZiB2b2lkICgqbXlmdW5jKSgpOwpjb25zdCBpbnQgRlVOQ1NfQ09VTlQgPSAzNjg7Cgp0ZW1wbGF0ZTx1bnNpZ25lZCBpPgp2b2lkIHByaW50X2Z1bmMoKSB7CiAgICBzdGQ6OmNvdXQgPDwgaSA8PCBzdGQ6OmVuZGw7Cn0KCnRlbXBsYXRlPHVuc2lnbmVkIGk+CnZvaWQgcHVzaF9mdW5jKG15ZnVuYyAqZnVuY3MpIHsKICAgIGZ1bmNzW2ldID0gJihwcmludF9mdW5jPGk+KTsKICAgIHB1c2hfZnVuYzxpLTE+KGZ1bmNzKTsKfQoKdGVtcGxhdGU8Pgp2b2lkIHB1c2hfZnVuYzwwPihteWZ1bmMgKmZ1bmNzKSB7CiAgICBmdW5jc1swXSA9ICYocHJpbnRfZnVuYzwwPik7Cn0KCmludCBtYWluKCkgewogICAgbXlmdW5jIGZ1bmNzW0ZVTkNTX0NPVU5UXTsKICAgIHB1c2hfZnVuYzxGVU5DU19DT1VOVD4oZnVuY3MpOwogICAgZm9yIChpbnQgaT0wOyBpPEZVTkNTX0NPVU5UOyArK2kpCiAgICAgICAgZnVuY3NbaV0oKTsKICAgIHJldHVybiAwOwp9