Submission #914483

#TimeUsernameProblemLanguageResultExecution timeMemory
914483WansurDungeons Game (IOI21_dungeons)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ent '\n' typedef long long ll; using namespace std; const int mx=4e5+12; vector<int> A,B,C,D; int N,m,k; void init(int M, vector<int> s, vector<int> p, vector<int> w, vector<int> l){ N=M; A=s,B=p; C=w,D=l; } long long simulate(int pos, ll x){ int n=N; vector<int> s=A,p=B,w=C,l=D; while(pos<n){ if(x>=s[pos]){ x+=s[pos]; pos=w[pos]; } else{ x+=p[pos]; pos=l[pos]; } } return x; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccdXFjLK.o: in function `main':
grader.cpp:(.text.startup+0x440): undefined reference to `simulate(int, int)'
collect2: error: ld returned 1 exit status