#include "vision.h"
#define pb push_back
#include <bits/stdc++.h>
#define DEBUGGING
using namespace std;
#ifdef DEBUGGING
#include "../debug.h"
#else
#define debug(x...) void(42)
#endif
int h, w, k;
static inline bool in_bounds(int i, int j)
{
return i >= 0 && j >= 0 && i < h && j < w;
}
static inline int serialize(int i, int j)
{
return i * w + j;
}
int last;
void test_square(int i, int j)
{
vector<int> v;
for (int dj = k; dj>0; dj--)
{
int di = k-dj;
if (in_bounds(i+di, j+dj))
v.pb(serialize(i+di, j+dj));
if (!di)
continue;
if (in_bounds(i-di, j+dj))
v.pb(serialize(i-di, j+dj));
}
if (in_bounds(i+k, j))
v.pb(serialize(i+k, j));
if (v.empty())
return;
int a = add_or(v);
vector<int> vv;
vv.pb(a);
vv.pb(serialize(i, j));
int b = add_and(vv);
last = b;
}
void construct_network(int H, int W, int K)
{
h = H, w = W, k = K;
last = h*w;
if (last >= 4000)
{
test_square(0, 0);
}
else
{
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
test_square(i, j);
}
vector<int> v;
for (int i = h*w+1; i <= last; i+=2)
v.pb(i);
add_or(v);
}
Compilation message
vision.cpp:8:10: fatal error: ../debug.h: No such file or directory
8 | #include "../debug.h"
| ^~~~~~~~~~~~
compilation terminated.