#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define MAXN 20000001
#define append push_back
int r[MAXN];
int c[MAXN];
void construct_network(int H, int W, int k) {
int n, m, xr, xc, cr, cc, x, y;
n = H, m = W;
vector<int> v;
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++)
v.append(i * m + j);
r[i] = add_xor(v);
v.clear();
}
for(int j = 0; j < m; j++){
for(int i = 0; i < n; i++)
v.append(i * m + j);
c[j] = add_xor(v);
v.clear();
}
for(int i = 0; i < n; i++)
v.append(r[i]);
xr = add_or(v);
xr = add_not(xr);
v.clear();
for(int j = 0; j < m; j++)
v.append(c[j]);
xc = add_or(v);
xc = add_not(xc);
v.clear();
for(int i = 1; i < n; i++)
v.append(add_and({r[i - 1], r[i]}));
cr = add_or(v);
v.clear();
for(int j = 1; j < m; j++)
v.append(add_and({c[j - 1], c[j]}));
cc = add_or(v);
v.clear();
x = add_and({xr, cc});
y = add_and({xc, cr});
add_or({x, y});
}
# | 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... |