Ad
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;
    }
    • bool Or(bool a, bool b) {
    • return *("||" +!+ a +!+ b);
    • return a+b;
    • }
    • bool And(bool a, bool b) {
    • return !*("&&" + a + b);
    • return a*b;
    • }
    • bool Xor(bool a, bool b) {
    • return !*("^" + a + b - a * b * a - b * a * b);
    • return a!=b;
    • }