Description
![](https://i-blog.csdnimg.cn/blog_migrate/80788be4c9cfb332b30098eb21fcc5ee.png)
Input
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> using namespace 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))); return 0; }