Submission #418457

#TimeUsernameProblemLanguageResultExecution timeMemory
418457AzimjonVision Program (IOI19_vision)C++17
33 / 100
3 ms968 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; int a[222][222]; void construct_network(int H, int W, int K) { auto f = [&](int i, int j) { return i * W + j; }; int last = -1; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { for (int ii = 0; ii < H; ii++) { int t = K - abs(ii - i); for (int jj : {j - t, j + t}) { if (W <= jj || jj < 0 || abs(i - ii) + abs(j - jj) != K) { continue; } int x = add_and({f(i, j), f(ii, jj)}); if (last == -1) last = x; else last = add_or({last, x}); } } } } }
#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...