#include "walk.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define vi vector<int>
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
const int N = 1e5+100;
int n, m;
map<pair<int, int>, int> node;
vector<pair<int,int>> G[N];
vector<int> F[N];
vector<pair<ll, int>> g[N];
long long min_distance(std::vector<int> x, std::vector<int> h, std::vector<int> l, std::vector<int> r, std::vector<int> y, int s, int gg) {
n = x.size();
m = l.size();
return (ll) x.back()-x[0]+2*h[0];
// for(int i = 0; i < m; ++i){
// int u = l[i], v = r[i], L = y[i];
// F[u].pb(L);
// F[v].pb(L);
// G[u].pb({v, L});
// G[v].pb({u, L});
// }
// int co = 0;
// for(int i = 0; i < n; ++i){
// F[i].pb(0);
// F[i].pb(h[i]);
// sort(all(F[i]));
// F[i].erase(unique(all(F[i])), F[i].end());
// for(int p: F[i]){
// node[{i, p}] = co++;
// }
// for(int j = 0; j < F[i].size(); ++j){
// // cout << F[i][j] << ' ';
// for(int l = 1; l < F[i].size(); ++l){
// g[node[{i, F[i][j]}]].pb({node[{i, F[i][l]}], abs(F[i][j] - F[i][l])});
// g[node[{i, F[i][l]}]].pb({node[{i, F[i][j]}], abs(F[i][j] - F[i][l])});
// }
// }
// // cout << '\n';
// }
// for(int i = 0; i < n; ++i){
// for(auto U: G[i]){
// int u = U.ff; ll w = U.ss;
// if(u > i){
// int last = i;
// for(int j = i; j <= u; ++j){
// if(h[j] >= w){
// g[node[{last, w}]].pb({node[{j, w}], abs(x[j]-x[last])});
// g[node[{j, w}]].pb({node[{last, w}], abs(x[j]-x[last])});
// last = j;
// }
// }
// }
// }
// }
// vector<ll> dist(co, INT_MAX);
// vector<bool> vis(n);
// priority_queue<pair<ll, int>> Q;
// Q.push({0, node[{s, 0}]});
// dist[node[{s, 0}]] = 0;
// while(!Q.empty()){
// int v = Q.top().ss; Q.pop();
// if(vis[v]) continue;
// // cout << v << ' ' << dist[v] << '\n';
// vis[v] = 1;
// for(auto U: g[v]){
// int u = U.ff;
// ll w= U.ss;
// if(dist[u] > dist[v] + w){
// dist[u] = dist[v] + w;;
// Q.push({-dist[u], u});
// }
// }
// }
// return dist[node[{gg, 0}]];
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
7256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
7256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
9304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
9304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
7256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |