Code
Diff
  • bool Or(bool a, bool b) {
        return a+b;
    }
    
    bool And(bool a, bool b) {
        return a*b;
    }
    bool Xor(bool a, bool b) {
        return a!=b;
    }
  • 11
    bool Or(bool a, bool b) {
    
    2
        return *("||" +!+ a +!+ b);
    
    2+
        return a+b;
    
    33
    }
    
    44
    55
    bool And(bool a, bool b) {
    
    6
        return !*("&&" + a + b);
    
    6+
        return a*b;
    
    77
    }
    
    88
    bool Xor(bool a, bool b) {
    
    9
        return !*("^" + a + b - a * b * a - b * a * b);
    
    9+
        return a!=b;
    
    1010
    }