Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #define debug(l) cerr<<" smotri huinyi : "<<#l<<' '<<l<<'\n';
- #include "bits/stdc++.h"
- //#include "geometry.h"
- //#include "data_structure.h"
- using namespace std;
- using namespace chrono;
- #define all(cnt) cnt.begin(), cnt.end()
- #define allr(cnt) cnt.rbegin(), cnt.rend()
- #define sqrt(l) sqrtl(l)
- mt19937 rnd(std::chrono::high_resolution_clock::now().time_since_epoch().count());
- typedef long long ll;
- typedef long double ld;
- ll factor[20];
- signed main() {/*
- #ifdef _DEBUG
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif*/
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- for (int i = 0; i < (1 << 5); i++) {
- bitset<5> b;
- b = i;
- bool x1 = b[0], x2 = b[1], x3 = b[2], b1 = b[3], b2 = b[4];
- bool g1 = x1 ^ x2;
- bool g2 = g1 ^ x3;
- bool g3 = g2 ^ b1;
- bool g4 = x1 & x2;
- bool g5 = g1 & x3;
- bool g6 = g2 & b1;
- bool g7 = b2 ^ g4;
- bool g8 = g5 ^ g7;
- bool g9 = g6 ^ g8;
- bool g10 = b2 & g4;
- bool g11 = g5 & g7;
- bool g12 = g6 & g8;
- bool g13 = g10 | g11 | g12;
- bool g14 = g13 ^ g3;
- bool g15 = g9 ^ (g13 & g3);
- if ((b[0] + b[1] + b[2] + b[3] + b[4] * 2) % 3 == (g14 + g15 * 2)%3) {
- continue;
- }
- else {
- cout << "WA" << endl;
- cout << g14 << g15;
- cout << endl;
- cout << b[0] << ' ' << b[1]<<' ' << b[2] << ' ' << b[3] << ' ' << b[4] << endl << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement