#include <iostream>
template <typename T>
void print(const T array[], size_t SIZE)
{
for(size_t i = 0; i < SIZE; i++)
std::cout << array[i] << " ";
}
int main() {
int x[] = {1, 2, 3};
print(x, sizeof(x) / sizeof(int));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CnZvaWQgcHJpbnQoY29uc3QgVCBhcnJheVtdLCBzaXplX3QgU0laRSkKewogICAgZm9yKHNpemVfdCBpID0gMDsgaSA8IFNJWkU7IGkrKykKICAgICAgICBzdGQ6OmNvdXQgPDwgYXJyYXlbaV0gPDwgIiAiOwp9CmludCBtYWluKCkgewoJaW50IHhbXSA9IHsxLCAyLCAzfTsKCXByaW50KHgsIHNpemVvZih4KSAvIHNpemVvZihpbnQpKTsKCXJldHVybiAwOwp9