제출 #583915

#제출 시각아이디문제언어결과실행 시간메모리
583915PiejanVDCToy Train (IOI17_train)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "train.h"

using namespace std;

vector<int>tim;
vector<int>s,a,r;
vector<int>adj[15];
vector<int>ans;

int t = 1;

bool dfs(int u) {
    if(ans[u])
        return 1;
    if(tim[u]) {
        if(s.back() >= tim[u])
            return 1;
        return 0;
    }

    tim[u] = t++;
    if(r[u])
        s.push_back(t-1);

    bool ok;
    if(a[u]) {
        ok = 0;
        for(auto z : adj[u]) {
            ok |= dfs(z);
        }
    } else {
        ok = 1;
        for(auto z : adj[u]) {
            ok &= dfs(z);
        }
    }

    if(r[u])
        s.pop_back();
    tim[u] = 0;

    return ok;
}

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

/usr/bin/ld: /tmp/ccPb92ig.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