#include <cstdio>
template<std::size_t N>
int length(int (&ary)[N])
{
printf("%d %d %d\n", N * sizeof(int), sizeof(int), N);
return N;
}
int main () {
int ary[] = {1,2,3,4,5,6};
length(ary);
printf("%d %d %d\n", sizeof(ary), sizeof(ary[0]), sizeof(ary)/sizeof(ary[0]));
}
I2luY2x1ZGUgPGNzdGRpbz4KCnRlbXBsYXRlPHN0ZDo6c2l6ZV90IE4+CmludCBsZW5ndGgoaW50ICgmYXJ5KVtOXSkKewogICAgcHJpbnRmKCIlZCAlZCAlZFxuIiwgTiAqIHNpemVvZihpbnQpLCBzaXplb2YoaW50KSwgIE4pOwoJcmV0dXJuIE47Cn0KCmludCBtYWluICgpIHsKCWludCBhcnlbXSA9IHsxLDIsMyw0LDUsNn07CglsZW5ndGgoYXJ5KTsKCXByaW50ZigiJWQgJWQgJWRcbiIsIHNpemVvZihhcnkpLCBzaXplb2YoYXJ5WzBdKSwgc2l6ZW9mKGFyeSkvc2l6ZW9mKGFyeVswXSkpOwp9Cg==