# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1246803 | eradax | Vision Program (IOI19_vision) | C++20 | 0 ms | 0 KiB |
for (int j = 0; j < W; j++) {
vpi checks;
for (int k = i; k < H; k++) {
for (int w = 0; w < W; w++) {
if (abs(i - k) + abs(j - w) == K)
checks.emplace_back(k, w);
}
}
if (checks.empty())
continue;
vi check_trans;
for (auto [x, y] : checks)
check_trans.push_back(x * W + y);
add_or(check_trans);
inst++;
add_and({i * W + j, inst - 1});
inst++;
imp.push_back(inst - 1);
}
}
add_or(imp);
inst++;
}