#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_or({filas_or[i],filas_or[i+1],columnas_xor})});
}
for(int i=0;i<W-1;i++){
fin.push_back({add_or({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, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 0), (1, 1), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
3652 KB |
on inputs (126, 120), (176, 169), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |