답안 #538520

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
538520 2022-03-17T03:48:30 Z abcdehello Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#include <vision.h>
#include <bits/stdc++.h>
// TODO: declare global variables here
using namespace std;
vector <int> ld[401],rd[401],lor,ror,lp,rp,ans;
void precalc(int H,int W){
	for (int i=0;i<H;i++){
		for (int j=0;j<W;j++){
			ld[i+j].push_back(i*W+j);
			rd[i-j+W-1].push_back(i*W+j);
		}
	}
	for (int i=0;i<=H+W-2;i++){
		lor.push_back(add_or(ld[i]));
		ror.push_back(add_or(rd[i]));
		lp.push_back(add_or(lor));
		rp.push_back(add_or(ror));
	}
	//cerr << "***" << endl;
}
int calc(int H,int W,int K){
	vector <int> res;
	for (int i=0;i<=H+W-2;i++){
		if (i>=K){
			res.push_back(add_and({lor[i],lp[i-K]}));
			res.push_back(add_and({ror[i],rp[i-K]}));
		}
	}
	//cerr << "***" << endl;
	return add_or(res);
}
void construct_network(int H, int W, int K) {
	precalc(H,W);
	ans.push_back(calc(H,W,K));
	if (H+W-2<K) ans.push_back(calc(H,W,K+1));
	add_xor(ans);
}

int main() {
	std::ios::sync_with_stdio(false); std::cin.tie(0);
	int H, W, K;
	std::cin >> H >> W >> K;
	instructionNetwork.init(H, W);
	construct_network(H, W, K);
	return 0;
}

Compilation message

vision.cpp: In function 'int main()':
vision.cpp:43:2: error: 'instructionNetwork' was not declared in this scope; did you mean 'construct_network'?
   43 |  instructionNetwork.init(H, W);
      |  ^~~~~~~~~~~~~~~~~~
      |  construct_network