답안 #37579

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
37579 2017-12-26T08:15:48 Z grumpy_gordon Amusement Park (JOI17_amusement_park) C++14
컴파일 오류
0 ms 0 KB
void Joi(int N, int M, int A[], int B[], long long X, int T){
	for (int i = 0; i < 60; i++)
	if ((1ll << i) & X)
		MessageBoard(i, 1);
  	else
      	MessageBoard(i, 0);
  	for (int i = 60; i < N; i++)
		MessageBoard(i, 0);
}
const int maxn = 1e5 + 100;

int a[maxn];

vector<int> e[maxn];

bool vis[maxn];

void dfs(int v, int val){
  	vis[v] = 1;
  	a[v] = val;
  	for (auto i : e[v])
    if (!vis[i]){
      	dfs(i, Move(i));
      	Move(v);
    }
}

long long Ioi(int N, int M, int A[], int B[], int P, int V, int T){
	dfs(P, V);
  	long long ret = 0;
  	for (int i = 0; i < 60; i++)
		ret += (1ll << i) * a[i];
  	return ret;
}

Compilation message

Joi.cpp: In function 'void Joi(int, int, int*, int*, long long int, int)':
Joi.cpp:4:20: error: 'MessageBoard' was not declared in this scope
   MessageBoard(i, 1);
                    ^
Joi.cpp:6:25: error: 'MessageBoard' was not declared in this scope
        MessageBoard(i, 0);
                         ^
Joi.cpp:8:20: error: 'MessageBoard' was not declared in this scope
   MessageBoard(i, 0);
                    ^

Ioi.cpp:5:1: error: 'vector' does not name a type
 vector<int> e[maxn];
 ^
Ioi.cpp: In function 'void dfs(int, int)':
Ioi.cpp:12:18: error: 'e' was not declared in this scope
    for (auto i : e[v])
                  ^
Ioi.cpp:14:21: error: 'Move' was not declared in this scope
        dfs(i, Move(i));
                     ^