Submission #528195

#TimeUsernameProblemLanguageResultExecution timeMemory
528195Leo121Traffic (IOI10_traffic)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> #define forn(i, a, b) for(int i = int(a); i <= int(b); ++i) #define pb push_back using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; const int lim = 1e6; vi graph[lim]; int pesos[lim]; bool visitados[lim]; ll mayor = LLONG_MAX, res = 0; ll trafico(int u){ ll suma = 0; for(int v : graph[u]){ if(!visitados[v]){ visitados[v] = 1; suma += trafico(v); } } return suma + (ll) pesos[u]; } int LocateCentre(int N, int pp[], int S[], int D[]) { forn(i, 0, N - 1){ pesos[i] = pp[i]; } forn(i, 0, N - 2){ graph[S[i]].pb(D[i]); graph[D[i]].pb(S[i]); } ll aux; forn(i, 0, N - 1){ forn(j, 0, N - 1){ visitados[i] = 0; } visitados[i] = 1; aux = LLONG_MIN; for(int j : graph[i]){ aux = max(aux, trafico(j)); } if(mayor >= aux){ mayor = aux; res = i; } } return res; }

Compilation message (stderr)

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