Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- bool imp(bool x, bool y) {
- return !x || y;
- }
- bool F(bool x, bool y, bool z, bool w) {
- bool a1 = imp(x, y) || imp(z, w);
- bool a2 = imp(z == y, w == x);
- return a1 && a2;
- }
- int main()
- {
- vector <bool> v = {0, 1};
- for (bool x: v) {
- for (bool y: v) {
- for (bool z: v) {
- for (bool w: v) {
- bool r = F(x, y, z, w);
- if (r != 0) {
- continue;
- }
- cout << x << ' ' << y << ' ' << z << ' ' << w << ' ' << r << "\n";
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement