Submission #1026731

#TimeUsernameProblemLanguageResultExecution timeMemory
1026731fv3Vision Program (IOI19_vision)C++14
8 / 100
1 ms600 KiB
/* Vision Program */ #include <bits/stdc++.h> #include "vision.h" using namespace std; int height, width; int arrayPos(int c, int r) { return c * width + r; } bool inside(int c, int r) { return c >= 0 && c < height && r >= 0 && r < width; } void construct_network(int H, int W, int K) { height = H; width = W; vector<int> instructions; vector<int> Ns; for (int j = 0; j <= K; j++) { if (inside(j, (K - j))) Ns.push_back(arrayPos(j, (K - j))); } int i = add_or(Ns); instructions.push_back({add_and({0, i})}); add_or(instructions); } /* --Sample testcase-- vector<int> Ns; Ns = {0, 5}; int a = add_and(Ns); Ns = {3, 2}; int b = add_and(Ns); Ns = {a, b}; add_or(Ns); --- 2 3 1 0 0 1 2 -1 */
#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...