Submission #43689

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
436892018-03-19 15:40:38evpipisRace (IOI11_race)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> ii;
const int len = 2e5+5, inf = 1e9;
vector<ii> adj[len];
map<ll, int> *cnt, *help;
int ans = inf, sz[len], dep[len], p[len], n, k, isbig[len];
ll shift[len];
void fix(int u, int d){
sz[u] = 1;
dep[u] = d;
for (auto v: adj[u])
if (v.fi != p[u]){
p[v.fi] = u;
fix(v.fi, d+1);
sz[u] += sz[v.fi];
}
}
void add(int u, int x, int cur, ll dis){
if (x == 0 && (*help).count(k-dis-shift[cur]))
ans = min(ans, dep[u]+(*help)[k-dis-shift[cur]]-2*dep[cur]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

race.cpp: In function 'int best_path(int, int, int, int)':
race.cpp:86:20: error: invalid types 'int[int]' for array subscript
         int a = H[i][0], b = H[i][1], c = L[i];
                    ^
race.cpp:87:22: error: 'b' was not declared in this scope
         adj[a].pb(mp(b, c));
                      ^
race.cpp:87:25: error: 'c' was not declared in this scope
         adj[a].pb(mp(b, c));
                         ^