# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301656 | dsjong | Highway Tolls (IOI18_highway) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "highway.h"
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
int A, B, N, M;
long long len;
map<pair<int, int>, int>mp;
vector<int>adj[100005];
bool vis[100005];
int par[100005];
vector<pair<int, int>>bord;
void bfs(int src){
queue<int>q;
vis[src]=true;
q.push(src);
par[src]=-1;
while(!q.empty()){
int x=q.front();
q.pop();
for(int y:adj[x]){
if(vis[y]) continue;
vis[y]=true;
q.push(y);
par[y]=x;
bord.push_back({mp[{x, y}], y});
}
}
}
int tin[100005], tout[100005];