제출 #390187

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3901872021-04-15 14:24:28wind_reaperCrocodile's Underground City (IOI11_crocodile)C++17
100 / 100
641 ms64432 KiB
#include <bits/stdc++.h>
#ifndef LOCAL
#include "crocodile.h"
#endif
using namespace std;
const int64_t INF = 1e18;
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[]){
vector<array<int, 2>> g[N];
for(int i = 0; i < M; i++){
int u = R[i][0], v = R[i][1];
g[u].push_back({v, L[i]});
g[v].push_back({u, L[i]});
}
int64_t D[N][2];
int vis[N];
priority_queue< array<int64_t, 2>, vector<array<int64_t, 2>>, greater<array<int64_t, 2>> > pq;
for(int i = 0; i < N; i++){
D[i][0] = D[i][1] = INF;
vis[i] = 0;
}
for(int i = 0; i < K; i++){
int64_t v = P[i];
D[v][0] = D[v][1] = 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...