fork download
  1. struct A {
  2. int a;
  3. };
  4.  
  5. bool operator>(const A& a, const int& inty) { return a.a > inty; }
  6.  
  7. template <class A, class B> auto operator<(const A& a, const B& b) -> decltype(operator>(a,b)) { return a < b; }
  8.  
  9. int main(void) {
  10. A a; a.a = 1; int b = 2;
  11. //operator<(a,b);
  12. a < b;
  13. return 0;
  14. }
Time limit exceeded #stdin #stdout 5s 2824KB
stdin
Standard input is empty
stdout
Standard output is empty