The input consists of four lines, each line containing a single digit 0 or 1.
Output
Output a single digit, 0 or 1.
Example
input
0 1 1 0
output
0
一个数字电路,不过或门和异或门是反的,所以。。注意下
#include<bits/stdc++.h>
usingnamespace std;
#define ll long long
string s;
int a,b,c,d;
int main()
{
cin>>a>>b>>c>>d;
printf("%d\n",((a^b)&(c|d))^((b&c)|(a^d)));
return0;
}