#include <iostream>
#include <tuple>
using namespace std;
struct S { int a; char b; double c; };
auto const S_fields = [](S const& z) -> auto { return tie(z.a, z.b, z.c); };
bool operator == (S const& x, S const& y)
{
return S_fields(x) == S_fields(y);
}
bool operator < (S const& x, S const& y)
{
return S_fields(x) < S_fields(y);
}
int main() {
S p { 1,2,3 }, q {1,2,4};
cout << (p == p) << (p == q) << (p < p) << (p < q) << (q < p) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHVwbGU+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpzdHJ1Y3QgUyB7IGludCBhOyBjaGFyIGI7IGRvdWJsZSBjOyB9OwphdXRvIGNvbnN0IFNfZmllbGRzID0gW10oUyBjb25zdCYgeikgLT4gYXV0byB7IHJldHVybiB0aWUoei5hLCB6LmIsIHouYyk7IH07Cgpib29sIG9wZXJhdG9yID09IChTIGNvbnN0JiB4LCBTIGNvbnN0JiB5KQp7CglyZXR1cm4gU19maWVsZHMoeCkgPT0gU19maWVsZHMoeSk7Cn0KYm9vbCBvcGVyYXRvciA8IChTIGNvbnN0JiB4LCBTIGNvbnN0JiB5KQp7CglyZXR1cm4gU19maWVsZHMoeCkgPCBTX2ZpZWxkcyh5KTsKfQoKaW50IG1haW4oKSB7CglTIHAgeyAxLDIsMyB9LCBxIHsxLDIsNH07Cgljb3V0IDw8IChwID09IHApIDw8IChwID09IHEpIDw8IChwIDwgcCkgPDwgKHAgPCBxKSA8PCAocSA8IHApIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==