Submission #612144

#TimeUsernameProblemLanguageResultExecution timeMemory
612144l_rehoVision Program (IOI19_vision)C++14
0 / 100
2 ms976 KiB
#include "vision.h" 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); * */ int r1 = -1, c1 = -1, r2 = -1, c2 = -1; for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ int cord = i*W+j; if(add_not(cord) == 0){ if(r1 == -1) r1 = i, c1 = j; else r2 = i, c2 = j; } } if(r2 != -1) break; } int dist = abs(r1-r2) + abs(c1-c2); if(dist == K) add_not(0); else add_not(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...