Submission #1311144

#TimeUsernameProblemLanguageResultExecution timeMemory
1311144ayathkStations (IOI20_stations)C++20
Compilation error
0 ms0 KiB
#include "station.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first 
#define se second
#define all(a) a.begin(), a.end()

vector<int> label(int n, int k, vector<int> u, vector<int> v) {
	vector<int> labels(n);
    vector <vector <int>> adj(n);
	for (int i = 0; i < n; i++) {
        adj[u[i]].push_back(v[i]);
        adj[v[i]].push_back(u[i]);
	}

    int p = -1;
    queue <int> t;
    for(int i = 0;i < n;i++){
        if(adj[i].size() == 1){
            t.push(i);
            break;
        }
    }

    int cnt = 0;
    while(!t.empty()){
        int f = t.front();
        t.pop();

        label[f] = cnt;
        for(int i : adj[f]){
            if(i == p)continue;
            t.push(i);
        }
        cnt++;
        p = f;
    }
	return labels;
}

int find_next_station(int s, int t, vector<int> c) {

    if(t > s){
        return max(c[0], c[1]);
    }
    return min(c[0],c[1]);
}

Compilation message (stderr)

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