제출 #914483

#제출 시각아이디문제언어결과실행 시간메모리
914483Wansur던전 (IOI21_dungeons)C++17
컴파일 에러
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; }

컴파일 시 표준 에러 (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