제출 #1064008

#제출 시각아이디문제언어결과실행 시간메모리
1064008Ignut장난감 기차 (IOI17_train)C++17
컴파일 에러
0 ms0 KiB
// Ignut

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int N = 5555;
int n, m;

vector<int> a, r;

vector<int> g[N];

bool ans = false;

int used[N];

int cntR[N];

int currR = 0;

void dfs(int v) {
    used[v] = 1;
    cntR[v] = currR;
    currR += r[v];
    for (int to : g[v]) {
        if (used[to] == 1) {
            if (cntR[to] != currR) ans = true;
        }
        else if (used[to] == 0) {
            dfs(to);
        }
    }
    used[v] = 2;
}

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

/usr/bin/ld: /tmp/ccoGnbCJ.o: in function `main':
grader.cpp:(.text.startup+0x29f): undefined reference to `who_wins(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status