#include <vector>
#include <iostream>
#include <algorithm>
#include <ctype.h>
template <typename T>
bool isLowerCased(const T& elem)
{
return std::all_of(elem.begin(), elem.end(), ::islower);
}
bool isLowerCased(char c)
{
return ::islower(c);
}
bool isLowerCased(const char* cstr)
{
return isLowerCased(std::string(cstr));
}
int main()
{
std::cout << std::boolalpha
<< isLowerCased(std::string("something")) << '\n'
<< isLowerCased(std::vector<char>{'a','b','c'}) << '\n'
<< isLowerCased("something") << '\n'
<< isLowerCased('a') << '\n';
std::cout << isLowerCased("sometDFShing") << '\n'
<< isLowerCased('C') << '\n';
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y3R5cGUuaD4KCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpib29sIGlzTG93ZXJDYXNlZChjb25zdCBUJiBlbGVtKQp7CiAgICByZXR1cm4gc3RkOjphbGxfb2YoZWxlbS5iZWdpbigpLCBlbGVtLmVuZCgpLCA6OmlzbG93ZXIpOwp9Cgpib29sIGlzTG93ZXJDYXNlZChjaGFyIGMpCnsKICAgIHJldHVybiA6OmlzbG93ZXIoYyk7Cn0KCmJvb2wgaXNMb3dlckNhc2VkKGNvbnN0IGNoYXIqIGNzdHIpCnsKICAgIHJldHVybiBpc0xvd2VyQ2FzZWQoc3RkOjpzdHJpbmcoY3N0cikpOwp9CgoKaW50IG1haW4oKQp7CiAgICBzdGQ6OmNvdXQgPDwgc3RkOjpib29sYWxwaGEKICAgICAgICAgICAgICA8PCBpc0xvd2VyQ2FzZWQoc3RkOjpzdHJpbmcoInNvbWV0aGluZyIpKSA8PCAnXG4nCiAgICAgICAgICAgICAgPDwgaXNMb3dlckNhc2VkKHN0ZDo6dmVjdG9yPGNoYXI+eydhJywnYicsJ2MnfSkgPDwgJ1xuJwogICAgICAgICAgICAgIDw8IGlzTG93ZXJDYXNlZCgic29tZXRoaW5nIikgPDwgJ1xuJwogICAgICAgICAgICAgIDw8IGlzTG93ZXJDYXNlZCgnYScpIDw8ICdcbic7CgogICAgc3RkOjpjb3V0IDw8IGlzTG93ZXJDYXNlZCgic29tZXRERlNoaW5nIikgPDwgJ1xuJwogICAgICAgICAgICAgIDw8IGlzTG93ZXJDYXNlZCgnQycpIDw8ICdcbic7Cn0K