Submission #916127

#TimeUsernameProblemLanguageResultExecution timeMemory
916127AbitoAmusement Park (JOI17_amusement_park)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

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));
      |                          ^