# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
478341 | blue | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include <vector>
#include <cmath>
using namespace std;
void construct_network(int H, int W, int K)
{
vector<int> ops;
for(int i = 0; i < H; i++)
{
for(int j = 0; j < W; j++)
{
for(int i1 = i; i1 < H; i1++)
{
for(int j1 = 0; j1 < W; j1++)
{
if(i == i1 && j1 < j) continue;
if(abs(i - i1) + abs(j - j1) != K) continue;
ops.push_back(add_and(W*i + j, W*i1 + j1));
}
}
}
}
add_or(ops);
}