#pragma once #include template struct pair { R first; S second; pair() = default; pair( R&& x, S&& y ) : first( std::move(x) ), second( std::move(y) ) {} bool operator< (const pair& o) const { return first < o.first || ( first == o.first && second < o.second ); } bool operator<= (const pair& o) const { return first < o.first || ( first == o.first && second <= o.second ); } bool operator== (const pair& o) const { return first == o.first && second == o.second; } bool operator!= (const pair& o) const { return first != o.first || second != o.second; } bool operator> (const pair& o) const { return first > o.first || ( first == o.first && second > o.second ); } bool operator>= (const pair& o) const { return first > o.first || ( first == o.first && second >= o.second ); } };