제출 #836963

#제출 시각아이디문제언어결과실행 시간메모리
836963FulopMate던전 (IOI21_dungeons)C++17
컴파일 에러
0 ms0 KiB
#include "dungeons.h"
#include <bits/stdc++.h>

using namespace std;

int n;
vector<int> s, p, w, l;

void init(int n_, vector<int> s_, vector<int> p_, vector<int> w_, vector<int> l_) {
	n = n_;
    s = s_, p = p_, w = w_, l = l_;
    return;
}

long long simulate(int x, long long z) {
    for(; x != n;){
        if(z >= s[x]){
            z += s[x];
            x = w[x];
        } else {
            z += p[x];
            x = l[x];
        }
    }
	return z;
}

컴파일 시 표준 에러 (stderr) 메시지

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