#include "vision.h"
#include <iostream>
#include <vector>
#define ll int
using namespace std;
void construct_network(int H, int W, int K) {
vector <ll> V, X;
ll R[200], C[200], x, z;
for (int i=0; i<H*W; ++i) V.push_back(i);
x = add_or(V);
z = add_not(x);
for (int i=0; i<9; ++i) {
if (K & (1LL<<i)) X.push_back(add_or({x, x}));
else X.push_back(add_or({z, z}));
}
for (int i=0; i<H; ++i) {
V.clear();
for (int j=0; j<W; ++j) {
V.push_back(i*W+j);
}
R[i] = add_xor(V);
if (i) R[i] = add_xor({R[i-1], R[i]});
for (int k=0; k<9; ++k) {
X[k] = add_xor({R[i], X[k]});
R[i] = add_and({R[i], X[k]});
}
}
for (int j=0; j<W; ++j) {
V.clear();
for (int i=0; i<H; ++i) {
V.push_back(i*W+j);
}
C[j] = add_xor(V);
if (j) C[j] = add_xor({C[j-1], C[j]});
for (int k=0; k<9; ++k) {
X[k] = add_xor({C[j], X[k]});
C[j] = add_and({C[j], X[k]});
}
}
ll f = add_or(X);
add_not(f);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
604 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
13 ms |
2196 KB |
on inputs (80, 199), (81, 199), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |