Submission #416723

#TimeUsernameProblemLanguageResultExecution timeMemory
416723peuchVision Program (IOI19_vision)C++17
41 / 100
5 ms332 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int> finalAnswer; if(H * W <= 200){ for(int i = 0; i < H * W; i++){ for(int j = i + 1; j < H * W; j++){ int xi = i / W, yi = i % W; int xj = j / W, yj = j % W; vector<int> question (2); question[0] = i; question[1] = j; if(abs(xi - xj) + abs(yi - yj) == K) finalAnswer.push_back(add_and(question)); } } } else{ for(int i = 0; i < H * W; i++){ int xi = i / W, yi = i % W; if(xi + yi == K) finalAnswer.push_back(i); } } add_or(finalAnswer); }
#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...