Submission #830278

#TimeUsernameProblemLanguageResultExecution timeMemory
830278pavementVision Program (IOI19_vision)C++17
8 / 100
594 ms340 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 (max(i, j) == 0 && 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...