#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
map<pair<int, int>, int> numero;
int pos = 0;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
numero[{i, j}] = pos;
pos++;
}
}
vector<int>filas_or;
int filas_xor;
for (int i = 0; i < H; i++) {
vector<int>prueba;
for (int j = 0; j < W; j++) {
prueba.push_back(numero[{i,j}]);
}
filas_or.push_back(add_and(prueba));
}
filas_xor=add_xor(filas_or);
vector<int>columnas_or;
int columnas_xor;
for (int j = 0; j < W; j++) {
vector<int>prueba;
for (int i = 0; i < H; i++) {
prueba.push_back(numero[{i,j}]);
}
columnas_or.push_back(add_or(prueba));
}
columnas_xor=add_xor(columnas_or);
vector<int>fin;
for(int i=0;i<H-1;i++){
fin.push_back({add_and({filas_or[i],filas_or[i+1],columnas_xor})});
}
for(int i=0;i<W-1;i++){
fin.push_back({add_and({columnas_or[i],columnas_or[i+1],filas_xor})});
}
add_or(fin);
return;
}
# |
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 |
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 |
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 |
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 |
0 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 |
1 ms |
348 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
3676 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 |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |