제출 #638932

#제출 시각아이디문제언어결과실행 시간메모리
638932BackNoob경주 (Race) (IOI11_race)C++14
컴파일 에러
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]}); } }

컴파일 시 표준 에러 (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]});
      |         ^~~