Submission #1050198

#TimeUsernameProblemLanguageResultExecution timeMemory
1050198HalitVision Program (IOI19_vision)C++17
22 / 100
1 ms348 KiB
#include "vision.h" #include <bits/stdc++.h> void construct_network(int H, int W, int K) { if (H == 1 || W == 1) { std::vector<int> idx; for (int i = 0;i + K < H*W; ++i) { idx.push_back(add_and({i, i+K})); } add_or(idx); return; } if (H * W <= 10) { std::vector<int> idx; for (int i = 0;i < H*W; ++i) { for (int j = 0;j < H*W; ++j) { int x1 = i / W; int y1 = i % W; int x2 = j / W; int y2 = j % W; if (std::abs(x1 - x2) + std::abs(y1 - y2) == K) { idx.push_back(add_and({i, j})); } } } add_or(idx); return; } }
#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...