# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714775 | ajab_01 | Toll (BOI17_toll) | C++17 | 214 ms | 524288 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<bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 5e4 + 1;
const int O = 3e3 + 1;
vector<pair<int , int> > g[N] , query;
priority_queue<pair<int , int> > pq;
vector<int> vec;
int dp[N][O] , ind[N] , val[N] , pre[N] , pr[N] , k , n , m , o;
bool mark[N] , vis[N] , ch = 1;
void dijkstra(){
val[0] = 0;
pq.push({0 , 0});
while(!pq.empty()){
int v = pq.top().second;
pq.pop();
if(vis[v]) continue;
vis[v] = 1;
for(auto i : g[v]){
int u = i.first , w = i.second;
if(val[u] > val[v] + w){
val[u] = val[v] + w;
pq.push({-val[u] , u});
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |