Submission #638932

#TimeUsernameProblemLanguageResultExecution timeMemory
638932BackNoobRace (IOI11_race)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "race.h" #define ll long long #define fi first #define se second #define endl '\n' #define MASK(i) (1LL << (i)) #define ull unsigned long long #define ld long double #define pb push_back #define all(x) (x).begin() , (x).end() #define BIT(x , i) ((x >> (i)) & 1) #define TASK "task" #define sz(s) (int) (s).size() using namespace std; const int mxN = 2e5 + 227; const int inf = 1e9 + 277; const int mod = 1e9 + 7; const ll infll = 1e18 + 7; const int base = 307; const int LOG = 20; template <typename T1, typename T2> bool minimize(T1 &a, T2 b) { if (a > b) {a = b; return true;} return false; } template <typename T1, typename T2> bool maximize(T1 &a, T2 b) { if (a < b) {a = b; return true;} return false; } int best(int N, int K, int h[][2], int l[]) { return -1; for(int i = 0; i < n - 1; i++) { int u = h[i][0]; int v = h[i][1]; ++u; ++v; adj[u].pb({v, l[i]}); adj[v].pb({u, l[i]}); } }

Compilation message (stderr)

race.cpp: In function 'int best(int, int, int (*)[2], int*)':
race.cpp:35:24: error: 'n' was not declared in this scope
   35 |     for(int i = 0; i < n - 1; i++) {
      |                        ^
race.cpp:40:9: error: 'adj' was not declared in this scope
   40 |         adj[u].pb({v, l[i]});
      |         ^~~