Submission #1063682

# Submission time Handle Problem Language Result Execution time Memory
1063682 2024-08-17T23:29:13 Z aaaaaarroz Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#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_and);
	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(filas_and);
	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;
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:22:20: error: 'filas_and' was not declared in this scope; did you mean 'filas_xor'?
   22 |  filas_xor=add_xor(filas_and);
      |                    ^~~~~~~~~
      |                    filas_xor