#include <iostream>
#include <string.h>
using namespace std;
template<size_t N>
constexpr size_t strlen_(const char (&data)[N]) noexcept{
return N - 1;
}
int main()
{
const char hello_world[] = {'a','b','\0','e','f'};
cout << strlen_(hello_world) << endl; // Wrong. Even if the zero was not there.
cout << strlen(hello_world) << endl;
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGU8c2l6ZV90IE4+CmNvbnN0ZXhwciBzaXplX3Qgc3RybGVuXyhjb25zdCBjaGFyICgmZGF0YSlbTl0pIG5vZXhjZXB0ewogICAgcmV0dXJuIE4gLSAxOwp9CgppbnQgbWFpbigpCnsKCWNvbnN0IGNoYXIgaGVsbG9fd29ybGRbXSA9IHsnYScsJ2InLCdcMCcsJ2UnLCdmJ307Cgljb3V0IDw8IHN0cmxlbl8oaGVsbG9fd29ybGQpIDw8IGVuZGw7IC8vIFdyb25nLiBFdmVuIGlmIHRoZSB6ZXJvIHdhcyBub3QgdGhlcmUuCgljb3V0IDw8IHN0cmxlbihoZWxsb193b3JsZCkgPDwgZW5kbDsKCQoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJcmV0dXJuIDA7Cn0=