Submission #1037160

#TimeUsernameProblemLanguageResultExecution timeMemory
1037160shmaxVision Program (IOI19_vision)C++17
20 / 100
21 ms1112 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define len(x) (int)(x.size()) template<typename T> using vec = vector<T>; void construct_network(int H, int W, int K) { // std::vector<int> Ns; // Ns = {0, 1}; // int a = add_and(Ns); // Ns = {0, a}; // int b = add_or(Ns); // Ns = {0, 1, b}; // int c = add_xor(Ns); // add_not(c); vec<int> vals; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if (i != 0 and j != 0) continue; vec<int> index; for (int i1 = 0; i1 < H; i1++) { for (int j1 = 0; j1 < W; j1++) { if (abs(i1 - i) + abs(j1 - j) == K) { index.push_back({i1 * W + j1}); // vals.push_back(add_and({i * W + j, i1 * W + j1})); } } } if (index.empty()) continue; int t = add_or(index); vals.push_back(add_and({t, i * W + j})); } } add_or(vals); }
#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...