제출 #714775

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7147752023-03-25 09:11:54ajab_01Toll (BOI17_toll)C++17
17 / 100
214 ms524288 KiB
#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});
}
}
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...