摘要:
#include <iostream>#include <set>using namespace std;template<class T>class RuntimeCmp{public: enum cmp_mode{normal,reverse};private: cmp_mode mode;public: RuntimeCmp(cmp_mode m=normal):mode(m){} bool operator() (const T& t1,const T& t2) const{ return mode==normal ?t1<t2 阅读全文