#include <iostream>
#include <bits/stdc++.h>
#define maxN 100001
#define maxM 1000001
#include "crocodile.h"
using namespace std;
vector<pair<int,int>> drvo[maxN];
bitset <maxN> spec;
int mini[maxN];
int siguran[maxN];
void namesti(int n)
{
for(int i=0;i<n;i++)
{
siguran[i]=-1;
mini[i]=-1;
}
}
void dfs(int v,int par)
{
int cvor,w;
for(pair<int,int> p:drvo[v])
{
cvor=p.first;
w=p.second;
if(cvor!=par)
{
if(spec[cvor])
{
if(mini[v]>=w || mini[v]==-1)
{
siguran[v]=mini[v];
mini[v]=w;
}
else if(w<siguran[v] || siguran[v]==-1)
{
siguran[v]=w;
}
}
else{
dfs(cvor,v);
if(siguran[cvor]!=-1 && (siguran[cvor]+w<=mini[v] || mini[v]==-1))
{
siguran[v]=mini[v];
mini[v]=siguran[cvor]+w;
}
else if(siguran[cvor]!=-1 && (siguran[cvor]+w<siguran[v] || siguran[v]==-1))
{
siguran[v]=siguran[cvor]+w;
}
}
}
}
}
int travel_plan(int n,int m,int r[maxM][2],int l[maxM],int k,int p[maxN])
{
for(int i=0;i<m;i++)
{
drvo[r[i][0]].push_back({r[i][1],l[i]});
drvo[r[i][1]].push_back({r[i][0],l[i]});
}
for(int i=0;i<k;i++)
{
spec[p[i]]=1;
if(p[i]==0)
return 0;
}
dfs(0,-1);
return siguran[0];
}
Compilation message
crocodile.cpp:65:2: error: stray '\302' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:3: error: stray '\240' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:5: error: stray '\302' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:6: error: stray '\240' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:8: error: stray '\302' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:9: error: stray '\240' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:11: error: stray '\302' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:65:12: error: stray '\240' in program
65 | if(p[i]==0)
| ^
crocodile.cpp:66:2: error: stray '\302' in program
66 | return 0;
| ^
crocodile.cpp:66:3: error: stray '\240' in program
66 | return 0;
| ^
crocodile.cpp:66:5: error: stray '\302' in program
66 | return 0;
| ^
crocodile.cpp:66:6: error: stray '\240' in program
66 | return 0;
| ^
crocodile.cpp:66:8: error: stray '\302' in program
66 | return 0;
| ^
crocodile.cpp:66:9: error: stray '\240' in program
66 | return 0;
| ^
crocodile.cpp:66:11: error: stray '\302' in program
66 | return 0;
| ^
crocodile.cpp:66:12: error: stray '\240' in program
66 | return 0;
| ^
crocodile.cpp:66:14: error: stray '\302' in program
66 | return 0;
| ^
crocodile.cpp:66:15: error: stray '\240' in program
66 | return 0;
| ^
crocodile.cpp:67:2: error: stray '\302' in program
67 |
| ^
crocodile.cpp:67:3: error: stray '\240' in program
67 |
| ^
crocodile.cpp:67:5: error: stray '\302' in program
67 |
| ^
crocodile.cpp:67:6: error: stray '\240' in program
67 |
| ^
crocodile.cpp:67:8: error: stray '\302' in program
67 |
| ^
crocodile.cpp:67:9: error: stray '\240' in program
67 |
| ^
crocodile.cpp:68:2: error: stray '\302' in program
68 | }
| ^
crocodile.cpp:68:3: error: stray '\240' in program
68 | }
| ^
crocodile.cpp:68:5: error: stray '\302' in program
68 | }
| ^
crocodile.cpp:68:6: error: stray '\240' in program
68 | }
| ^