#include #include #include typedef struct { int x; int y; } Tpoint; bool operator < (Tpoint p, Tpoint pp) { if (p.x < pp.x) return true; if (p.x > pp.x) return false; if (p.y < pp.y) return true; return false; } set < Tpoint > s; main () { set < Tpoint > s; Tpoint point; point.x = 4; point.y = 5; s.insert (point); s.insert (point); cout << s.size (); cout << (*s.begin ()).x; cout << s.count (point); }