답안 #370365

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
370365 2021-02-23T21:43:57 Z MilosMilutinovic Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
#define pb push_back
int check(int H,int W,int K){
	int sz=H+W-2;
	vector<int> x[sz],y[sz];
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			x[i+j].pb(i*W+j);
			y[i+W-j-1].pb(i*W+j);
		}
	}
	vector<int> d[5];
	for(int i=0;i<=sz;i++){
		d[0].pb(add_or(x[i]));
		d[1].pb(add_or(y[i]));
		d[2].pb(add_or(d[0]));
		d[3].pb(add_or(d[1]));
		if(i>K){
			d[4].pb(add_and({d[0][i],d[2][i-K]}));
			d[4].pb(add_and({d[1][i],d[3][i-K]}));
		}
	}
	return add_or(d[4]);
}
void construct_network(int H,int W,int K){
	if(H+W-2==K)solve(H,W,K);
	else{
		add_xor({solve(H,W,K),solve(H,W,K+1)});
	}
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:28:14: error: 'solve' was not declared in this scope
   28 |  if(H+W-2==K)solve(H,W,K);
      |              ^~~~~
vision.cpp:30:12: error: 'solve' was not declared in this scope
   30 |   add_xor({solve(H,W,K),solve(H,W,K+1)});
      |            ^~~~~
vision.cpp:30:40: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   30 |   add_xor({solve(H,W,K),solve(H,W,K+1)});
      |                                        ^
      |                                        |
      |                                        <brace-enclosed initializer list>