Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <vector>
- #include <set>
- #include <string>
- #include <algorithm>
- using namespace std;
- using ll = long long;
- void cv(vector <int> v){
- for (auto x: v) cout<<x<<' ';
- cout<<'\n';
- }
- bool f(bool x1, bool x2, bool x3){
- bool A, B, C, D, E, F, G, H, I, J, K;
- A = x1 && !x2;
- B = !x1 && x3;
- C = x1 && !x2;
- D = !x1 && x3;
- E = A || x3;
- F = B || !x2;
- G = C || x3;
- H = D || !x2;
- I = E && !F;
- J = !G && H;
- K = I || J;
- return K;
- }
- int main()
- {
- int ans = 0;
- vector <bool> al = {false, true};
- for (bool a: al){
- for (bool b: al){
- for (bool c: al){
- if (f(a, b, c) == false){
- ans++;
- }
- }
- }
- }
- cout<<"ans= "<<ans<<'\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement