답안 #136541

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
136541 2019-07-25T13:00:57 Z miguel 악어의 지하 도시 (IOI11_crocodile) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#include<crocodile.h>
using namespace std;
#define pb push_back
#define dbg(x) cout << #x << '=' << x << '\n';
#define ll long long
#define x first
#define y second
#define pi pair <int, int>
#define pii pair <int, pi>
#define vi vector <int>
const ll mod = 998244353;
vector <pi> g[10001];
int t[10001];

void dfs(int nod, int p){
    for(pi i: g[nod]){
        if(i.x!=p) dfs(i.x, nod);
    }
    int mn[2];
    mn[0]=mn[1]=1000000001;
    if(t[nod]==1000000001){
        for(pi i: g[nod]){
            if(i.x!=p){
                int xd=t[i.x]+i.y;
                for(int id=0; id<2; id++) if(mn[id]>xd) swap(xd, mn[id]);
            }
        }
        t[nod]=mn[1];
    }
}

int travel_plan(int n, int m, int r[][2], int l[], int k, int p[]){
    for(int i=0; i<n; i++) t[i]=1000000001;
    for(int i=0; i<k; i++) t[p[i]]=0;
    for(int i=0; i<m; i++){
        g[r[i][0]].pb({r[i][1], l[i]});
        g[r[i][1]].pb({r[i][0], l[i]});
    }
    dfs(0, -1);
    return t[0];
}

int32_t main(){
    ios_base :: sync_with_stdio(0); cin.tie(); cout.tie();
    int n, b;
    cin>>n>>b;
    int a[n];
    for(int i=0; i<n; i++) cin>>a[i];
    cout<<besthub(n, (int)1e9, a, b);
}

Compilation message

crocodile.cpp: In function 'int32_t main()':
crocodile.cpp:50:11: error: 'besthub' was not declared in this scope
     cout<<besthub(n, (int)1e9, a, b);
           ^~~~~~~