Submission #430881

#TimeUsernameProblemLanguageResultExecution timeMemory
430881_fractalVision Program (IOI19_vision)C++14
33 / 100
3 ms1096 KiB
#include "vision.h" #include <iostream> using namespace std; const int dx[] = {+1, +1}; const int dy[] = {+1, -1}; void construct_network(int H, int W, int K) { int sz = H * W; vector<int> ask; for (int i = 0; i < H; ++i) { for (int j = 0; j < W; ++j) { for (int k = 0; k <= K; ++k) { for (int x = 0; x < 2; ++x) { if (i + dx[x] * k >= H || i + dx[x] * k < 0 || j + dy[x] * (K - k) >= W || j + dy[x] * (K - k) < 0) continue; ask.push_back(sz); sz++; int a = i * W + j; int b = (i + dx[x] * k) * W + j + dy[x] * (K - k); add_and({a, b}); } } } } add_or(ask); }
#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...