답안 #916127

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
916127 2024-01-25T10:49:51 Z Abito Amusement Park (JOI17_amusement_park) C++14
컴파일 오류
0 ms 0 KB
#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
void Joi(int N, int M, int A[], int B[], long long X, int T) {
    for (int i=0;i<N;i++) MessageBoard(i,bool(X&(1<<(i%60))));
    return;
}
#include "Ioi.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int NN=1e4+5;
vector<int> adj[NN];
int n,m;
long long X=0;
bool vis[NN];
void dfs(int node,int p){
    vis[node]=true;
    for (auto u:adj[node]){
        if (vis[u]) continue;
        int y=Move(u);
        if (y) X|=(1LL<<(u%60));
        dfs(u,node);
    }
    if (p!=-1){
        int y=Move(p);
        if (y) X|=(1LL<<(u%60));
    }
    return;
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
    n=N,m=M;
    for (int i=0;i<m;i++){
        adj[A[i]].pb(B[i]);
        adj[B[i]].pb(A[i]);
    }
    if (V) X|=(1LL<<(P%60));
    dfs(P,-1);
    for (int i=0;i<m;i++) adj[i].clear();
    return X;
}

Compilation message

Ioi.cpp: In function 'void dfs(int, int)':
Ioi.cpp:20:26: error: 'u' was not declared in this scope
   20 |         if (y) X|=(1LL<<(u%60));
      |                          ^