답안 #165937

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
165937 2019-11-29T18:54:43 Z lukameladze Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
# include <bits/stdc++.h>
using namespace std;
int w,h,k;
vector<int >d1[100005],d2[100005],x1,x2,y11,y2,xx1,xx2,yy1,yy2,v,vv,v1;
void construct_network(int H, int W, int K){
{
	for (int i=0; i<H; i++)
	{
		for (int j=0; j<W; j++)
		{
			d1[i+j].push_back(i*W+j);
			d2[i-j+W-1].push_back(i*W+j);
		}
	}
	for (int i=0; i<H+W-1; i++)
	{
		x1.push_back(add_or(d1[i]));
		y11.push_back(add_or(d2[i]));
		x2.push_back(add_or(x1));
		y2.push_back(add_or(x2));
		if (i>=K)
		{
			v.push_back(add_and(x1[i],x2[i-K]));
			v.push_back(add_and(y11[i],y2[i-K]));
		}		
	}
	
	
	for (int i=0; i<h+w-1; i++)
	{
		xx1.push_back(add_or(d1[i]));
		yy1.push_back(add_or(d2[i]));
		xx2.push_back(add_or(x1));
		yy2.push_back(add_or(x2));
		if (i>=K+1)
		{
			vv.push_back(add_and(xx1[i],xx2[i-K-1]));
			vv.push_back(add_and(yy1[i],yy2[i-K-1]));
		}		
	}
	v1.push_back(add_or(v));
	v1.push_back(add_or(vv))
	return add_xor(v1);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:17:16: error: 'add_or' was not declared in this scope
   x1.push_back(add_or(d1[i]));
                ^~~~~~
vision.cpp:17:16: note: suggested alternative: 'rand_r'
   x1.push_back(add_or(d1[i]));
                ^~~~~~
                rand_r
vision.cpp:23:16: error: 'add_and' was not declared in this scope
    v.push_back(add_and(x1[i],x2[i-K]));
                ^~~~~~~
vision.cpp:31:17: error: 'add_or' was not declared in this scope
   xx1.push_back(add_or(d1[i]));
                 ^~~~~~
vision.cpp:31:17: note: suggested alternative: 'rand_r'
   xx1.push_back(add_or(d1[i]));
                 ^~~~~~
                 rand_r
vision.cpp:37:17: error: 'add_and' was not declared in this scope
    vv.push_back(add_and(xx1[i],xx2[i-K-1]));
                 ^~~~~~~
vision.cpp:41:15: error: 'add_or' was not declared in this scope
  v1.push_back(add_or(v));
               ^~~~~~
vision.cpp:41:15: note: suggested alternative: 'rand_r'
  v1.push_back(add_or(v));
               ^~~~~~
               rand_r
vision.cpp:44:1: error: expected '}' at end of input
 }
 ^