# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
140375 | muradeyn | Crocodile's Underground City (IOI11_crocodile) | 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 "crocodile.h"
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
const int maxx = 100000;
int x , y;
int ext[maxx];
long long min1[maxx] , min2[maxx];
vector< pair<long long,int> >v[maxx];
priority_queue< pair<long long,int> >pq;
void dijkstra() {
while (!pq.empty()) {
int x = pq.top().S;
long long y = pq.top().F;
pq.pop();
y *= -1;
if (!ext[x] && y > min2[x])continue;
for (auto to : v[x]) {
if (min1[to.F] == -1) {
min1[to.F] = y + to.S;
continue;
}