Submission #578702

#TimeUsernameProblemLanguageResultExecution timeMemory
578702VanillaVision Program (IOI19_vision)C++17
33 / 100
80 ms976 KiB
#include <bits/stdc++.h> #include "vision.h" using namespace std; int dist (int x1, int y1, int x2, int y2) { return abs(x2 - x1) + abs(y2 - y1); } void construct_network(int H, int W, int K) { int op = 0; for (int i1 = 0; i1 < H; i1++){ for (int j1 = 0; j1 < W; j1++){ for (int i2 = 0; i2 < H; i2++){ for (int j2 = 0; j2 < W; j2++){ if (dist(i1, j1, i2, j2) == K) { // cout << i1 << " " << j1 << " " << i2 << " " << j2 << "\n"; add_and({i1 * W + j1, i2 * W + j2}); op++; } } } } } vector <int> last; for (int i = H * W; i < H * W + op; i++){ last.push_back(i); } add_or(last); }
#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...