#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<bool>> vvb;
typedef vector<vector<ll>> vvll;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef vector<char> vc;
typedef vector<vector<char>> vvc;
typedef map<int, int> mii;
typedef unordered_map<int, int> umii;
void construct_network(int H, int W, int K) {
int cnt = 0;
for (int x1 = 0; x1 < H; x1++) {
for (int y1 = 0; y1 < W; y1++) {
for (int x2 = 0; x2 < H; x2++) {
for (int y2 = 0; y2 < W; y2++) {
if (abs(x1 - x2) + abs(y1 - y2) != K) continue;
int c1 = x1 * W + y1, c2 = x2 * W + y2;
add_and({c1, c2});
cnt++;
}
}
}
}
vi x;
for (int i = 0; i < cnt; i++) {
x.push_back(H * W + i);
}
add_or(x);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |