Submission #1026716

# Submission time Handle Problem Language Result Execution time Memory
1026716 2024-07-18T09:33:54 Z Gr1sen Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include "vision.h"
#include<vector>
#include<iostream>
#include<algorithm>

using namespace std;

#define vi vector<int>

void H1(int w, int k) {
	if (k >= w) {
		add_not(0);
		return;
	}
	vi L;
	int c = w;
	for (int i = 0; i < w-k; i++) {
		add_and({i, i+k});
		L.push_back(c);
		c++;
	}
	add_or(L);
}

void construct_network(int H, int W, int K) {
	if (H == 1) {
		H1(w, k);
		return;
	}
	if (W == 1) {
		H1(H, k);
		return;
	}
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:27:6: error: 'w' was not declared in this scope
   27 |   H1(w, k);
      |      ^
vision.cpp:27:9: error: 'k' was not declared in this scope
   27 |   H1(w, k);
      |         ^
vision.cpp:31:9: error: 'k' was not declared in this scope
   31 |   H1(H, k);
      |         ^