Submission #254060

#TimeUsernameProblemLanguageResultExecution timeMemory
254060ErkhemkhuuSky Walking (IOI19_walk)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define F first #define S second const ll N = 105; typedef vector <int> vi; bool vis[N][N]; vector <pair <int, int> > adj[N][N]; int find_split(vi x, vi h, vi l, vi r, vi y, int s, int g) { int n, m, i, j; n = x.size(); m = l.size(); for(i = 0; i < n; i++) { for(j = h[i]; j >= 1; j--) { adj[x[i]][j].pb(mp(x[i], j - 1)); adj[x[i]][j - 1].pb(mp(x[i], j)); } } for(i = 0; i < m; i++) { for(j = x[l[i]] + 1; j <= x[r[i]]; j++) { adj[j][y[i]].pb(mp(j - 1, y[i])); adj[j - 1][y[i]].pb(mp(j, y[i])); } } queue <pair <pair <int, int>, int> > q; q.push(mp(mp(x[s], 0), 0)); while(!q.empty()) { auto v = q.front(); q.pop(); if(v.F.F == x[g] && !v.F.S) return v.S; if(vis[v.F.F][v.F.S]) continue; vis[v.F.F][v.F.S] = true; for(auto &to: adj[v.F.F][v.F.S]) { if(vis[to.F][to.S]) continue; q.push(mp(mp(to.F, to.S), v.S + 1)); } } return 12344321; }

Compilation message (stderr)

/tmp/ccjjadK2.o: In function `main':
grader.cpp:(.text.startup+0x390): undefined reference to `min_distance(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int)'
collect2: error: ld returned 1 exit status