Submission #1048578

#TimeUsernameProblemLanguageResultExecution timeMemory
1048578aykhnVision Program (IOI19_vision)C++17
14 / 100
5 ms1176 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int> rw(H), cl(W); vector<int> conr(H - 1), conc(W - 1); for (int i = 0; i < H; i++) { vector<int> v; for (int j = 0; j < W; j++) v.push_back(i * W + j); rw[i] = add_xor(v); if (i) conr[i - 1] = add_and({rw[i], rw[i - 1]}); } for (int j = 0; j < W; j++) { vector<int> v; for (int i = 0; i < H; i++) v.push_back(i * W + j); cl[j] = add_xor(v); if (j) conc[j - 1] = add_and({cl[j], cl[j - 1]}); } if (H == 1) { add_or(conc); } else if (W == 1) { add_or(conr); } else if (H > 1 && W > 1) { int A = add_or(rw), B = add_or(cl); int x = add_and({add_not(A), add_or(conc)}); int y = add_and({add_not(B), add_or(conr)}); add_or({x, y}); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...