#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <initializer_list>
template <typename T>
bool different(std::vector<T> list)
{
if (list.size() > 1)
{
std::sort(list.begin(), list.end());
for (auto i = list.begin(); i != list.end() - 1; ++i)
if (*i == *(i + 1))
return false;
}
return true;
}
template <typename T>
bool different(std::initializer_list<T> list)
{
return different(std::vector<T>(list.begin(), list.end()));
}
int main()
{
int a, b, c;
a = 3; b = 4; c = 4;
std::cout << std::boolalpha << different({ a, b, c }) << '\n' ;
a = 5, b = 3, c = 4;
std::cout << different({ a, b, c }) << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bnVtZXJpYz4KI2luY2x1ZGUgPGluaXRpYWxpemVyX2xpc3Q+Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KYm9vbCBkaWZmZXJlbnQoc3RkOjp2ZWN0b3I8VD4gbGlzdCkKewogICAgaWYgKGxpc3Quc2l6ZSgpID4gMSkKICAgIHsKICAgICAgICBzdGQ6OnNvcnQobGlzdC5iZWdpbigpLCBsaXN0LmVuZCgpKTsKCiAgICAgICAgZm9yIChhdXRvIGkgPSBsaXN0LmJlZ2luKCk7IGkgIT0gbGlzdC5lbmQoKSAtIDE7ICsraSkKICAgICAgICAgICAgaWYgKCppID09ICooaSArIDEpKQogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICAgIHJldHVybiB0cnVlOwp9Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KYm9vbCBkaWZmZXJlbnQoc3RkOjppbml0aWFsaXplcl9saXN0PFQ+IGxpc3QpCnsKICAgIHJldHVybiBkaWZmZXJlbnQoc3RkOjp2ZWN0b3I8VD4obGlzdC5iZWdpbigpLCBsaXN0LmVuZCgpKSk7Cn0KCgppbnQgbWFpbigpCnsKICAgIGludCBhLCBiLCBjOwogICAgYSA9IDM7IGIgPSA0OyBjID0gNDsKCiAgICBzdGQ6OmNvdXQgPDwgc3RkOjpib29sYWxwaGEgPDwgZGlmZmVyZW50KHsgYSwgYiwgYyB9KSA8PCAnXG4nIDsKCiAgICBhID0gNSwgYiA9IDMsIGMgPSA0OwoKICAgIHN0ZDo6Y291dCA8PCBkaWZmZXJlbnQoeyBhLCBiLCBjIH0pIDw8ICdcbic7Cn0=