Submission #44430

# Submission time Handle Problem Language Result Execution time Memory
44430 2018-04-02T06:43:16 Z xenoframium Amusement Park (JOI17_amusement_park) C++14
Compilation error
0 ms 0 KB
#include "Ioi.h"
#include <bits/stdc++.h>
#define F(i,s,n) for(int i=s;i<n;i++)
#define EB emplace_back
#define G(i,x) get<i>(x)
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long ll;
typedef vector<ii> vii;

static ll x;
static int vis[10005],p,hp,cnt,qcnt,pcnt,st[10005];
static vi adj[10005];

static void dfs(int v){
    int ccnt=cnt++;
    if(v==p){
        pcnt=ccnt;
        hp=1;
    }
    for(int u:adj[v]){
        if(!vis[u]){
            vis[u]=1;
            if(hp/*&&!st[ccnt+1]*/){
                if(Move(u))x|=(1LL<<(ccnt+1)%60);
                qcnt++;
                //st[ccnt+1]=1;
            }
            dfs(u);
            if(hp){
                if(Move(v))x|=(1LL<<ccnt%60);
                qcnt++;
                st[ccnt]=1;
            }
        }
    }
}

long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
    p=P;
    F(i,0,M){
        adj[A[i]].EB(B[i]);
        adj[B[i]].EB(A[i]);
    }
    while(true){
        Move(adj[P][0]);
        Move(P);
    }
    vis[0]=1;
    dfs(0);
    //if(V)x|=(1<<pcnt%60);
    return x;
}



    

Compilation message

Joi.cpp: In function 'void dfs(int)':
Joi.cpp:26:20: error: 'Move' was not declared in this scope
                 if(Move(u))x|=(1LL<<(ccnt+1)%60);
                    ^~~~
Joi.cpp:32:20: error: 'Move' was not declared in this scope
                 if(Move(v))x|=(1LL<<ccnt%60);
                    ^~~~
Joi.cpp: In function 'long long int Ioi(int, int, int*, int*, int, int, int)':
Joi.cpp:47:9: error: 'Move' was not declared in this scope
         Move(adj[P][0]);
         ^~~~

/tmp/ccIFicER.o: In function `main':
grader_ioi.cpp:(.text.startup+0x36a): undefined reference to `Ioi(int, int, int*, int*, int, int, int)'
collect2: error: ld returned 1 exit status