답안 #329722

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
329722 2020-11-22T07:15:45 Z NintsiChkhaidze 기지국 (IOI20_stations) C++14
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
vector <int> vec[1005];
int cnt,in[1005],out[1005];
void dfs(int x,int p){
    in[x] = cnt++;
    for (int j=0;j<vec[x].size();j++){
        int to = vec[x][j];
        if (to == p) continue;
        dfs(to,x);
    }
    out[x] = cnt++;
}
 
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
    vector<int> labels;
    for (int i=0;i<1001;i++){
        vec[i].clear();
        in[i] = out[i] = 0;
    }
    for (int i=0;i<u.size();i++){
        vec[u[i]].pb(v[i]);
        vec[v[i]].pb(u[i]);
    }
    
    cnt=0;
    dfs(0,0);
    for (int i=0;i<n;i++)
        labels.pb(in[i]*1000 + out[i]);
    
    return labels;
}
int find_next_station(int s, int t, vector<int> c) {
    int Ins = (s/1000),Int = (t/1000),Out = (t%1000);
    if (Ins < Int){
        for (int i=1;i<c.size();i++)
            if (Int >= (c[i]/1000) && (c[i]%1000) >= Out) return c[i];
    }
    return c[0];
}

Compilation message

stations.cpp:1:10: fatal error: grader.h: No such file or directory
    1 | #include "grader.h"
      |          ^~~~~~~~~~
compilation terminated.