Submission #1046452

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10464522024-08-06 14:59:37oscar1fCrocodile's Underground City (IOI11_crocodile)C++17
100 / 100
243 ms68292 KiB
#include<bits/stdc++.h>
#include "crocodile.h"
using namespace std;
const int MAX_SOM=100*1000+5,INFINI=1000*1000*1000+5;
int nbSom,nbAre,nbExit;
int dist[MAX_SOM];
int meil[MAX_SOM][2];
vector<pair<int,int>> adja[MAX_SOM];
priority_queue<pair<int,int>> possi;
void ajout(int pos,int val) {
if (val<meil[pos][1]) {
meil[pos][1]=val;
if (meil[pos][0]>meil[pos][1]) {
swap(meil[pos][0],meil[pos][1]);
}
possi.push({-meil[pos][1],pos});
}
}
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[]) {
nbSom=N;
nbAre=M;
nbExit=K;
for (int i=0;i<nbSom;i++) {
meil[i][0]=INFINI;
meil[i][1]=INFINI;
dist[i]=-1;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...