Submission #933449

#TimeUsernameProblemLanguageResultExecution timeMemory
933449parlimoosAmusement Park (JOI17_amusement_park)C++14
Compilation error
0 ms0 KiB
//Be Name KHODA #pragma GCC optimize("Ofast") #include "Joi.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define pp pop_back #define lb lower_bound #define ub upper_bound #define cl clear #define bg begin #define arr(x) array<int , x> #define endl '\n' int n , m; vector<int> tr[10000]; int tms[10000][2] , ps[10000]; bool ms[10000]; vector<int> tour; ll o; int timer = -1; void dfs1(int v = 0 , int p = -1){ tms[v][0] = ++timer , tour.pb(v); ps[v] = p , ms[v] = 1; for(int u : tr[v]) if(!ms[u]) dfs1(u , v) , tour.pb(v); tms[v][1] = timer; } void dfs2(int v){ ms[v] = 1; for(int u : tr[v]){ if(!ms[u] and u != ps[v] and tms[u][0] < 60){ ll d = Move(u); o |= (d << (tms[u][0] % 60)); dfs2(u); d = Move(v); } } } void Joi(int N , int M , int A[] , int B[] , ll X , int T){ n = N , m = M; for(int i = 0 ; i < m ; i++) tr[A[i]].pb(B[i]) , tr[B[i]].pb(A[i]); dfs1(); for(int i = 0 ; i < n ; i++){ MessageBoard(i , ((X >> (tms[i][0] % 60)) & 1ll)); } }
//Be Name KHODA #pragma GCC optimize("Ofast") #include<bits/stdc++.h> #include "Ioi.h" using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define pp pop_back #define lb lower_bound #define ub upper_bound #define cl clear #define bg begin #define arr(x) array<int , x> #define endl '\n' int n , m; vector<int> tr[10000]; int tms[10000][2] , ps[10000]; bool ms[10000]; vector<int> tour; ll o; int timer = -1; void dfs1(int v = 0 , int p = -1){ tms[v][0] = ++timer , tour.pb(v); ps[v] = p , ms[v] = 1; for(int u : tr[v]) if(!ms[u]) dfs1(u , v) , tour.pb(v); tms[v][1] = timer; } void dfs2(int v){ ms[v] = 1; for(int u : tr[v]){ if(!ms[u] and u != ps[v] and tms[u][0] < 60){ ll d = (1ll * Move(u)); o |= (d << (tms[u][0] % 60)); dfs2(u); d = Move(v); } } } ll 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++) tr[A[i]].pb(B[i]) , tr[B[i]].pb(A[i]); dfs1(); o = ((1ll * V) << (tms[P][0] % 60)); if(tms[P][0] >= 59){ int i = 0; for(; tour[i] != P ; i++); while(tms[tour[i]][0] != tms[P][0] - 59){ ll d = Move(tour[i - 1]); o |= (d << (tms[tour[i - 1]][0] % 60)); i--; } return o; }else{ fill(&ms[0] , &ms[n] , 0); while(true){ dfs2(P); if(ps[P] == -1) break; ll d = Move(ps[P]); P = ps[P]; o |= (d << tms[P][0]); } return o; } }

Compilation message (stderr)

Joi.cpp: In function 'void dfs2(int)':
Joi.cpp:36:20: error: 'Move' was not declared in this scope
   36 |             ll d = Move(u);
      |                    ^~~~