Submission #830260

#TimeUsernameProblemLanguageResultExecution timeMemory
830260pavementVision Program (IOI19_vision)C++17
33 / 100
177 ms1040 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { auto conv = [&](int r, int c) { return r * W + c; }; int ins = 0; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { for (int k = i; k < H; k++) { for (int l = (i == k ? j : 0); l < W; l++) { if (abs(i - k) + abs(j - l) == K) { add_and({conv(i, j), conv(k, l)}); ins++; } } } } } vector<int> tmp(ins); iota(tmp.begin(), tmp.end(), H * W); add_or(tmp); }
#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...