#include <iostream>
using namespace std;
template<typename T>
auto _test_hello_world_exists(T &f, int) -> decltype(f.helloworld()) {
cout << "Has Helloworld" << endl;
}
template<typename T>
void _test_hello_world_exists(T &f, long) {
cout << "hasen't helloworld" << endl;
}
template<typename T>
void test_hello_world_exists(T &f) {
_test_hello_world_exists(f, 0);
}
class has_helloworld_class {
public:
void helloworld() {};
};
class no_helloworld_class {
};
int main() {
// your code goes here
has_helloworld_class a;
no_helloworld_class b;
test_hello_world_exists(a);
test_hello_world_exists(b);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGU8dHlwZW5hbWUgVD4KYXV0byBfdGVzdF9oZWxsb193b3JsZF9leGlzdHMoVCAmZiwgaW50KSAtPiBkZWNsdHlwZShmLmhlbGxvd29ybGQoKSkgewoJY291dCA8PCAiSGFzIEhlbGxvd29ybGQiIDw8IGVuZGw7Cn0KCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CnZvaWQgX3Rlc3RfaGVsbG9fd29ybGRfZXhpc3RzKFQgJmYsIGxvbmcpIHsKCWNvdXQgPDwgImhhc2VuJ3QgaGVsbG93b3JsZCIgPDwgZW5kbDsKfQoKdGVtcGxhdGU8dHlwZW5hbWUgVD4Kdm9pZCB0ZXN0X2hlbGxvX3dvcmxkX2V4aXN0cyhUICZmKSB7CglfdGVzdF9oZWxsb193b3JsZF9leGlzdHMoZiwgMCk7Cn0KCmNsYXNzIGhhc19oZWxsb3dvcmxkX2NsYXNzIHsKcHVibGljOgoJdm9pZCBoZWxsb3dvcmxkKCkge307Cn07CiAKY2xhc3Mgbm9faGVsbG93b3JsZF9jbGFzcyB7Cn07CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCWhhc19oZWxsb3dvcmxkX2NsYXNzIGE7Cglub19oZWxsb3dvcmxkX2NsYXNzIGI7Cgl0ZXN0X2hlbGxvX3dvcmxkX2V4aXN0cyhhKTsKCXRlc3RfaGVsbG9fd29ybGRfZXhpc3RzKGIpOwoJcmV0dXJuIDA7Cn0=