Submission #778512

#TimeUsernameProblemLanguageResultExecution timeMemory
778512JosiaVision Program (IOI19_vision)C++17
0 / 100
2 ms976 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; int convert(pair<int, int> cords, int H, int W) { return cords.first*W + cords.second; } void construct_network(int H, int W, int K) { vector<int> finalComp; for (int i=0; i<H; i++) { for (int j = 0; j<W; j++) { vector<int> prs; for (int k = max(0, i-K); k<min(H, i+K+1); k++) { for (int l = j; l<min(W, j+K+1); l++) { if (abs(i-k) + abs(j-l) == K) { prs.push_back(convert({k,l}, H, W)); } } } finalComp.push_back(add_and({convert({i, j}, H, W), add_or(prs)})); } } add_or(finalComp); }
#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...