제출 #370340

#제출 시각아이디문제언어결과실행 시간메모리
370340MilosMilutinovicVision Program (IOI19_vision)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int h,w,k;
int Get(int i,int j){return i*w+j;}
void SolveBF(){
	vector<int> ask;
	int cnt=h*w;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			for(int x=i;x<h;x++){
				for(int y=j;y<w;j++){
					int dist=x-i+y-j;
					if(dist!=k)continue;
					add_and(Get(i,j),Get(x,y));
					ask.pb(cnt++);
				}
			}
		}
	}
	add_or(ask);
}
void construct_network(int H,int W,int K){
	h=H,w=W,k=K;
	if(max(H,W)<=30){
		SolveBF();
		return;
	}
}

컴파일 시 표준 에러 (stderr) 메시지

vision.cpp: In function 'void SolveBF()':
vision.cpp:15:6: error: 'add_and' was not declared in this scope
   15 |      add_and(Get(i,j),Get(x,y));
      |      ^~~~~~~
vision.cpp:21:2: error: 'add_or' was not declared in this scope
   21 |  add_or(ask);
      |  ^~~~~~